Skip to content

Git as save-points

Status: drafted · Time: 45 min · Audience: new-builder Outcome: Use branches, commits, push, pull, status, and diff as the save-point system behind pull requests.

Git is the shared save-point system for code. A commit is a named save point. A branch is a safe lane for your work. A pull request is the review conversation around moving your save points back into the shared lane.

White Belt does not require deep git. It requires enough git to avoid losing work and enough judgement to ask before forceful commands.


  • Run git status constantly. It tells you what changed and what git thinks is happening.
  • Work on a branch, not directly on the shared branch.
  • A PR is not “extra admin.” It is how your change becomes reviewable and mergeable.

Picture a notebook with checkpoints.

main branch: A --- B --- C
your branch: \--- D --- E

A, B, C, D, and E are commits. The shared branch has the team’s commits. Your branch starts from the shared branch and adds your commits. A PR asks: “Can D and E join the shared branch?”

The four verbs matter:

  • clone: bring a repo to your laptop;
  • commit: make a local save point;
  • push: send your save point to the remote repo;
  • pull: bring remote updates down to your laptop.

The loop you need is:

Terminal window
git status
git switch -c white-belt/hello-razorpay
# edit one file
git diff
git add README.md
git commit -m "docs: update hello razorpay note"
git push -u origin white-belt/hello-razorpay

You will use that loop in Quest W-1.


Use an assigned sandbox repo. Do not practice random commits in a production repo.

Clone the repo:

Terminal window
git clone <assigned-sandbox-repo>
cd <assigned-sandbox-folder>
git status

Create a branch:

Terminal window
git switch -c white-belt/practice

Open README.md and add one harmless line in the practice section. Then inspect:

Terminal window
git status
git diff

Read the diff. A + line is added. A - line is removed. If the diff shows files you did not intend to touch, stop and ask for help before committing.

Stage the intended file:

Terminal window
git add README.md
git status

Commit:

Terminal window
git commit -m "docs: add white belt practice note"
git status

Push:

Terminal window
git push -u origin white-belt/practice

The remote host will give you a PR link or show the branch in the browser. That is the bridge into W12.


CommandMeaning
git statusShow current branch and changed files.
git diffShow unstaged changes.
git diff --stagedShow changes ready to commit.
git add <file>Stage one file for commit.
git commit -m "message"Create a save point.
git switch -c <branch>Create and move to a new branch.
git pullBring remote changes down.
git pushSend local commits up.

Avoid these until you have help: reset --hard, push --force, bulk deletion, and anything you cannot explain in one sentence.


“I am on the wrong branch.” Run git status. If you have no changes, switch to the correct branch. If you have changes, ask before switching.

“Git says there are conflicts.” Stop. Conflicts mean two changes touched the same lines. That is solvable, but it is not a solo White Belt move.

“I committed the wrong file.” Pause. A mentor or Claude can help inspect and repair. The important thing is not to stack more commits blindly.

“Push was rejected.” The remote has changes you do not have, or the branch setup is wrong. Copy the exact output into your help request.

“I do not understand the diff.” Ask Claude: “Explain this diff line by line. Do not change files.” Diff reading is a skill, not a moral test.


You are GREEN if you can:

  • clone an assigned sandbox repo;
  • create a branch;
  • make one README edit;
  • read git status and git diff;
  • commit and push one change.

You are YELLOW if:

  • commit works but push fails;
  • you can read status but not diff;
  • you changed extra files accidentally.

You are RED if:

  • clone fails because of access;
  • conflicts appear;
  • a command suggests force, reset, or destructive repair.

YELLOW and RED are normal in the first week. Save the exact terminal output.


“I can use git as save-points for one small change.”


Previous: W.2 Terminal fluency - Next: W.4 Your auth setup