Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

git delete the most recent commit

Delete the most recent commit, without destroying the work you've done:

git reset --soft HEAD~1

Delete the most recent commit and remove changes:

git reset --hard HEAD~1
 
PREVIOUS NEXT
Tagged: #git #delete #commit
ADD COMMENT
Topic
Name
2+3 =