Shell/Bash: pop last commit git Example

By

Shell/Bash Example: This is the "pop last commit git" Example. compiled from many sources on the internet by SimpleTutorials.org

undo last commit

#this  will preserve changes done to your files
git reset --soft HEAD~1

#this will get rid of the commit and the changes done to the files
$ git reset --hard HEAD~1
 

pop last commit git

#this  will preserve changes done to your files
git reset --soft HEAD~1

#this will get rid of the commit and the changes done to the files
$ git reset --hard HEAD~1


* Summary: This "pop last commit git" Shell/Bash Example is compiled from the internet. If you have any questions, please leave a comment. Thank you!

Others