🔍 Plain English to Git, in one search

Git Command Finder

Type what you want to do. Get the exact command, why it works, and what'll bite you if you're not careful.

✓ 70+ scenarios ✓ Risk-flagged ✓ Runs in your browser
All
Undo
Branches
Commits
Remote
Stash
Merge / Rebase
Inspect / Diff
Config

Looking for an engineering job?

Browse roles from companies where engineers ship real things — with culture context, employee-reported WLB, and current open positions.

Browse Engineering Jobs →

How this tool works

Search the database by what you're trying to do, not by which git command does it. Type undo last commit, rename branch, or get changes from someone else's branch — the matching commands are ranked by the strength of the keyword match.

Every command is annotated with a risk badge: safe (purely local or read-only), warning (changes local state in ways that need attention), or danger (rewrites history or can permanently lose work). Read the caveat before running anything flagged danger.

The five git commands you'll use most

Every engineer ends up using a small subset of git's surface area 95% of the time: git status, git add, git commit, git push, and git pull. The other 200 commands exist for the moments when something's gone slightly wrong — which is exactly when you don't want to be Googling.

The riskiest commands to memorize wrong are the ones that rewrite history: git reset --hard, git push --force, git rebase -i, and git filter-branch. Each one can destroy work that hasn't been pushed yet. The reflog (git reflog) is your safety net for almost everything — it remembers your local HEAD movements for ~90 days. If you've nuked something locally, check the reflog before despairing.

Frequently asked questions

How do I undo my last commit?+
Use git reset --soft HEAD~1 to undo the commit but keep the changes staged. Use git reset --mixed HEAD~1 (the default) to undo the commit and unstage the changes. Use git reset --hard HEAD~1 to undo the commit AND discard the changes (destructive). If the commit has already been pushed, prefer git revert HEAD to create a new commit that reverses it without rewriting history.
How do I rename a Git branch?+
If you're currently on the branch you want to rename, use git branch -m new-name. If you're on a different branch, use git branch -m old-name new-name. To rename the remote branch, push the new name and delete the old one: git push origin -u new-name && git push origin --delete old-name.
How do I delete a Git branch locally and remotely?+
Delete the local branch with git branch -d branch-name (safe, fails if unmerged) or git branch -D branch-name (force). Delete the remote branch with git push origin --delete branch-name. Always check with your team before deleting shared branches.
How do I see what files have changed in Git?+
Use git status for a summary of staged, unstaged, and untracked changes. Use git diff for unstaged changes, git diff --staged for staged changes, and git diff branch1..branch2 to compare branches. For just file names, add --name-only.
How do I move uncommitted changes to a new branch?+
Create and switch to a new branch with your current changes: git checkout -b new-branch. Your uncommitted changes will move with you. Then add and commit normally on the new branch.
Is git reset --hard reversible?+
Sometimes. If the commits being lost are still in the reflog (which they usually are for up to 90 days), you can recover them with git reflog to find the commit hash, then git reset --hard <hash>. However, uncommitted changes that were not staged are typically lost. The rule: never run git reset --hard without verifying you have no uncommitted work, and consider git stash instead.