Git for Engineering Teams
A practical daily workflow for creating small, understandable changes.
Git records a project as a history of commits. A useful commit has one purpose, contains only the files needed for that purpose, and leaves the repository in a working state.
Set your identity
Your name and email are stored in every commit you create. Use the identity your team expects before making the first commit.
Use repository-level configuration without --global when one project needs a different identity. Check the effective values with git config --list --show-origin.
The daily loop
Start by confirming where you are and whether the working tree already contains changes.
git pull --ff-only updates the branch only when Git can move it forward without creating a merge commit. If the histories diverged, it stops and lets you decide how to integrate them.
After editing, review the unstaged change before selecting what belongs in the commit.
Prefer explicit paths over git add . when unrelated work is present. git diff --staged is the final review of what the commit will contain.
Before you push
Run the relevant tests, then use git status and git show --stat to confirm the branch is clean and the last commit contains the intended files.
The -u option records the remote branch as the upstream. Later pushes and status checks can use that relationship without repeating the branch name.
Read the history
Use history to understand why code changed, not to assign fault. Start with the commit message and review before reading individual lines.