Paste a git command and read what each part of it does, with a safety level that separates commands which rewrite history from ones that destroy work.
Waiting for a git command
Paste any git command. 22 commands are covered, with their flags.
The explanation appears here
Each word of the command, what it does, and whether it can lose work.
This reads the command you typed and nothing else. It has no repository to look at, so it cannot know what branch you are on, what is staged, or whether a rebase is already in progress — all of which change what a command does. Treat it as an explanation of the command, not a prediction about your working tree.
Git Command Explainer runs entirely on your device — nothing is uploaded.
You’re on the Free plan. Compare plans
Git's interface is famously unforgiving: several of its most useful commands are one flag away from one of its most destructive, and the names give very little away. `git reset` does three unrelated things depending on a flag. `git checkout` did two until `switch` and `restore` split them up. This reads the command you paste and says what each word in it contributes.
The safety classification is the part worth having, and it has three levels rather than two. Safe means nothing is lost. Rewrites history means nothing is lost locally — the old commits sit in the reflog for a fortnight — but every other clone of the repository now disagrees with yours, which is a different kind of damage needing a different response. Destructive means work can be gone with no undo. Collapsing the middle category into the third is how people learn to ignore the warning.
A flag can change the level, so the classification is computed over the whole command rather than looked up by its first word. `git checkout branch` is safe; `git checkout -- file` discards your uncommitted changes to that file with nothing to recover from. The explanation says which flag did it.
Where there is a safer way to get the same result, it is offered — `git revert` instead of a reset on a pushed commit, `--force-with-lease` instead of `--force`. And where an undo exists, it is given, because the useful moment to learn about the reflog is before you need it rather than after.
Nothing is executed. There is no repository here and no shell, and the command is tokenised as text — which is exactly why it is safe to paste a command somebody sent you and find out what it does before running it.
No. There is no repository here and no shell — the command is read as text. That is the point: you can paste something you were sent and find out what it does without running it.
Because the damage is different and so is the fix. A rewrite loses nothing locally; the commits are in your reflog for weeks. What it breaks is every other clone, which now has a history that disagrees with yours. A destructive command loses work outright. Treating them the same trains people to ignore both warnings.
No — rewriting your own unshared branch and pushing it is routine. It is wrong when somebody else has pulled the commits you are replacing. `--force-with-lease` refuses when the remote has moved since you last fetched, which catches exactly that case and costs nothing.
No, and that limit matters. It does not know what branch you are on, what is staged, or whether a rebase is already in progress — all of which change what a command does. It explains the command, not your working tree.
The words it recognises are still explained and the rest are marked unknown rather than guessed at. A plausible-sounding explanation of a flag that does something else is worse than no explanation.