Git

From Useful Things
Revision as of 03:20, 16 January 2015 by Milosivanovic (talk | contribs) (Created page with "== Undo last commit and KEEP changes == <pre> git reset --soft HEAD~1 </pre> == Undo last commit and LOSE changes == <pre> git reset --hard HEAD~1 </pre>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Undo last commit and KEEP changes

git reset --soft HEAD~1

Undo last commit and LOSE changes

git reset --hard HEAD~1