Skip to content

Git & collaboration

↑

A healthy Git workflow does more than preserve files. It makes changes reviewable, protects the shared source of truth and helps the team explain which change introduced a problem. Start with one small branch, verify it, and merge through a reviewed pull request or merge request.

The protected main branch is the team’s integration reference, not proof that every deployment is correct. Record the exact commit or release tag deployed to an environment. The connection should look like issue → branch → commits → pull request → checks → merge commit → release/deployment. Git records content history; the hosting platform and CI system preserve review and deployment context.

GitHub calls a proposed change a pull request; GitLab calls it a merge request. The underlying review principle is the same, but the controls and permission models differ. Never copy instructions for GitHub branch protection into GitLab without adapting them.

The ComputingForGeeks branching article and Practical GitHub Project Management and Collaboration by Ray Villalobos offer additional perspectives. UI instructions in this library follow current GitHub documentation rather than assuming older courses show the latest interface.

Repositories can use master instead of main. origin is a conventional remote name, and origin/main is your local record of the last fetched remote branch tip. Start with Git terminology before copying commands.