Friday 19 June 2015

Git: Completely Undo Previous Commit

git reset --hard HEAD~1
 
 
    (F)
A-B-C
    ↑
  master
 
becomes:

 (F)
A-B
  ↑
master
 

source: http://stackoverflow.com/questions/927358/how-to-undo-the-last-commit

No comments:

Post a Comment