Where every command actually moves your data — click a command to find out.
Shows what's changed in your workspace and staging area since the last commit.
Shows the exact line changes between your workspace and the staging area.
Shows the exact line changes between staging and your last commit.
Shows the commit history of your local repository.
Copies your edited files into staging as ready-to-commit blobs. Nothing is permanent yet.
Stages modifications and deletions for files Git already tracks, skipping new untracked files.
Deletes a file and stages its removal in one step.
Renames or moves a file and stages the rename in one step.
Wraps everything in staging into a new, permanent snapshot in your local history.
Stages every already-tracked change and commits it, skipping git add entirely.
Overwrites a file in your workspace with the version from staging, discarding local edits.
Resets staging to match your last commit — it unstages files. Your workspace files are left untouched.
! this destroys workMoves the branch pointer and forces your workspace and staging to match it. Uncommitted work is gone.
Writes a brand-new commit into your local repo that undoes an earlier one. Nothing is erased — history stays intact.
Checks out an existing branch, overwriting your workspace with that branch’s files.
Creates a new branch pointer at the commit you are already on, and switches to it. Your files do not change.
Combines another branch’s history into the current one by writing a merge commit into your local repo, then updates your files to match.
! this destroys workRewrites your local history: replays your branch’s commits as new commits on top of another branch.
Copies one commit from elsewhere as a new commit on your current branch.
Downloads new commits and branches from the remote, without touching your workspace.
Uploads your local commits to the remote repository.
! this destroys workOverwrites the remote branch with yours, deleting any commits on the remote that you do not have. Teammates lose work.
Fetches from the remote and merges it into your current branch, updating your workspace.
Downloads an entire remote repository, creating a full local copy with a working directory.
Sets aside your uncommitted changes and returns your workspace to a clean state.
Reapplies your most recent stash to the workspace and removes it from the stash list.
Reapplies your most recent stash to the workspace but keeps it in the stash list.
The columns above show where your files go. They cannot show where you are. HEAD is Git's answer: a pointer that says which commit you are standing on. Almost always it points at a branch, and the branch points at a commit.
The normal state. HEAD points at main, main points at the newest commit. Commit and both pointers move forward together — this is why your work reliably reappears when you come back to the branch.