2OF1 · the depletionmode zineLinkedIn · X
← back to the issue

02 August 2010

Git: Undo commits

Originally published on the old depletionmode / 2of1 blog (archived copy).

Undo last commit:

listing text
git reset --soft HEAD^

Commit with previous commit message:

listing text
git commit <-a OR file(s)> -c ORIG_HEAD

Undo all commits:

listing text
git reset master^

→ end of entry

2/1
@depletionmode
security research & systems engineering