Back to blogGitRank Journal

The 5 Git Commands You Will Use Every Day

A practical, information-dense guide to the five Git commands that power daily work, with context, flags, and real-world usage tips.

The 5 Git Commands You Will Use Every Day cover
Abhimanyu Saharan

Abhimanyu Saharan

GitRank Contributor

January 30, 2026
gitbeginnerworkflowversion controlcommands

Most Git advice is scattered across docs and blog posts. This guide is not. It focuses on the five commands you will use every day and gives you the context that makes them predictable, not magical.

Before we start, keep this mental model in mind:

  • Working tree: files on your disk right now.
  • Staging area (index): the snapshot you are building for the next commit.
  • Repository (HEAD): the last committed snapshot.
  • Remote: the shared copy (usually origin).

When Git feels confusing, it is usually because you have lost track of which layer you are looking at.

Here is the everyday loop in one line:

  1. See what changed (git status)
  2. Choose what to save (git add)
  3. Save a snapshot (git commit)
  4. Bring in team updates (git pull)
  5. Share your work (git push)

1) git status

What it does: Shows the state of your working tree and staging area.

Why it matters: It is the fastest way to answer, "What did I change and what will be committed?"

Daily usage:

git status -sb
  • -s gives a compact summary
  • -b shows the current branch

Example output (read it line by line):

## feature/login
 M src/components/LoginForm.tsx
A  src/utils/validate.ts
?? notes/todo.md
  • M means modified but not staged
  • A means staged and ready to commit
  • ?? means untracked

Useful variants:

  • git status -u shows untracked files
  • git status -uno hides untracked files (useful in large repos)

Pro tip: Run git status before and after every commit. It will prevent 90% of mistakes.

2) git add

What it does: Moves changes from the working tree into the staging area.

Why it matters: It lets you decide what goes into the next commit.

Daily usage:

git add .

Better for real work:

git add -p

-p (patch mode) lets you review and stage changes chunk by chunk. This is the single best habit for clean commits.

Common patterns:

  • Stage everything: git add -A
  • Stage one file: git add src/app.ts
  • Stage interactively: git add -p

Undo a bad add:

git restore --staged <file>

Pro tip: Pair git add -p with git diff --staged to review exactly what will be committed.

3) git commit

What it does: Creates a permanent snapshot from the staging area.

Why it matters: Commits are the building blocks of your history. Good commits are small, clear, and reversible.

Daily usage:

git commit -m "Add client-side validation"

Common variants (know what they do):

  • git commit -am "Message" stages and commits tracked files only (skips new files)
  • git commit --amend updates the last commit (do not use if already pushed)

Commit message rule of thumb:

  • Start with a verb: Add, Fix, Update, Remove, Refactor
  • Describe the change, not the file

Pro tip: If a commit feels too big to explain in one line, it is probably too big to be one commit.

4) git pull

What it does: Fetches from the remote and merges into your current branch.

Why it matters: It keeps your local branch in sync with your team.

Daily usage:

git pull

Know this: git pull = git fetch + git merge. If you prefer a linear history, your team might use rebase instead:

git pull --rebase

When conflicts happen:

  1. Open the conflicted file
  2. Choose which changes to keep
  3. Run git add <file>
  4. Continue with git commit (or git rebase --continue if you rebased)

Pro tip: If you are unsure, run git fetch first and inspect with git log --oneline --graph --decorate before merging.

5) git push

What it does: Sends your local commits to the remote.

Why it matters: It is how your work becomes visible to everyone else.

Daily usage:

git push

First push of a new branch:

git push -u origin feature/login

-u sets the upstream so future git push and git pull just work.

If you see "non-fast-forward":

  • Pull first: git pull --rebase
  • Then push again

Force push only when you must:

git push --force-with-lease

This is safer than --force, but still use it carefully.

Daily workflow example (realistic)

# Start the day

git status -sb

git pull --rebase

# Work on a feature

git add -p

git diff --staged

git commit -m "Add input validation for email"

git push

Quick cheat sheet

GoalCommandExampleNotes
See changesgit statusgit status -sbShows branch + staged/unstaged summary
Stage filesgit addgit add -pStage changes in small chunks
Save snapshotgit commitgit commit -m "Fix typo"Commits staged changes only
Get updatesgit pullgit pull --rebaseFetch + merge (or rebase)
Share workgit pushgit push -u origin feature/xSet upstream on first push

Common mistakes (and fixes)

  • Committing everything blindly. Fix: use git add -p and review with git diff --staged.
  • Forgetting to pull before starting. Fix: make git pull --rebase the first command of the day.
  • Pushing a messy commit. Fix: use git commit --amend before you push.
  • Working on main. Fix: create a branch with git checkout -b feature/x.

Bonus: three commands that level you up fast

  • git diff --staged to review what you are about to commit
  • git log --oneline --graph --decorate to see history clearly
  • git restore --staged <file> to unstage mistakes without losing work

Next steps

If the five commands above feel easy, the next skills to learn are branching, rebasing, and stashing. But you do not need any of that to be effective today. Master these five and Git becomes predictable.

Ready to turn daily Git work into visible progress? Join GitRank to track your momentum, compare with peers, and keep your streaks honest.

Thanks for reading.Back to blog