Answers for "revert recent commit"

33

roll back last commit in git

git reset --soft HEAD~1
Posted by: Guest on March-30-2020
2

undo most recent commit

$ git commit -m "some comment"                
$ git reset HEAD~                                          
<< edit files as necessary >>                              
$ git add ...                                              
$ git commit -c ORIG_HEAD
Posted by: Guest on June-18-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language