How to cancel a local git commit

(loosing changes, like checking out previous commit) 
 
git reset --hard HEAD~1
 
 
(will not lose changes, only cancels commit) 
git reset --soft HEAD~1

No comments:

Post a Comment