Cubis Engineers

Git for Engineering Teams

A practical daily workflow for creating small, understandable changes.

Developer workflowFoundationUpdated Aug 13, 2026gitversion-controlcommitsbranches

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.

Terminal
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
git config --global init.defaultBranch main
git --version

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.

Terminal
git status --short --branch
git switch main
git pull --ff-only
git switch -c feat/health-check

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.

Terminal
git diff
git add app/health/route.ts tests/health.test.ts
git diff --staged
git commit -m "Add service health endpoint"

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.

Terminal
git status
git show --stat --oneline HEAD
git push -u origin feat/health-check

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

Terminal
git log --oneline --decorate --graph --all -20
git show <commit>
git blame -L 20,45 path/to/file

Use history to understand why code changed, not to assign fault. Start with the commit message and review before reading individual lines.

Next

On this page