Git Command Reference

Find the right Git command with real-world examples and explanations.

The Git Commands You Actually Use

Git has hundreds of commands and flags, but most developers use the same 20-30 commands daily. The challenge is remembering the exact syntax for the less-common ones — how do you squash the last 3 commits? How do you undo a pushed commit without rewriting history? How do you cherry-pick a commit from another branch? Our reference answers these instantly.

Each command includes the exact syntax, what it does, and a practical example. No manual-page verbosity — just the commands that solve real problems developers face every day. Search by what you're trying to accomplish, not by command name.

The reference covers branching, merging, rebasing, stashing, undoing changes, working with remotes, log inspection, config management, and advanced operations like bisect, worktree, and submodules. Bookmark it as your daily Git companion.

Tips

  • git log --oneline --graph --all shows a visual branch history — alias it as git tree in your gitconfig.
  • git stash push -m "description" is better than git stash — the message makes stashes findable later.
  • git commit --fixup=HEAD + git rebase -i --autosquash is the cleanest way to amend an older commit.
  • git reflog is your safety net — it shows every HEAD position for the last 90 days, even after resets.

Ready to get started?

Open Git Reference

New tools every week

Get notified. No spam.