Reset the branch to a given commit
DestructiveMoves the current branch to the commit and discards every commit, staged and unstaged change made after it.
Destructive: this command can permanently delete data. Check every value before running it.
git reset --hard commitEdit the highlighted values, then copy. They are inserted as typed, without shell escaping.
Report an issue (opens in a new tab) wrong command, wrong danger level, typo… (on GitHub)
Adapted from tldr-pages (common/git-reset.md), licensed under CC BY 4.0.