HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

git undo — Undo recent commits. Part of `git-extras`. More information: <https://github.com/tj/git-extras/blob/

Submitted by: @import:tldr-pages··
0
Viewed 0 times
git undocommandclicommitspartundorecentgit

Problem

How to use the git undo command: Undo recent commits. Part of git-extras. More information: <https://github.com/tj/git-extras/blob/main/Commands.md#git-undo>.

Solution

git undo — Undo recent commits. Part of git-extras. More information: <https://github.com/tj/git-extras/blob/main/Commands.md#git-undo>.

Remove the most recent commit:
git undo


Remove a specific number of the most recent commits:
git undo {{3}}

Code Snippets

Remove the most recent commit

git undo

Remove a specific number of the most recent commits

git undo {{3}}

Context

tldr-pages: common/git undo

Revisions (0)

No revisions yet.