Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

undo previous commit but keep changes

// The easiest way to undo the last Git commit is to execute the “git reset” command with the “–soft” option that will preserve changes done to your files.

$ git reset --soft HEAD~1
Source by devconnected.com #
 
PREVIOUS NEXT
Tagged: #undo #previous #commit
ADD COMMENT
Topic
Name
7+5 =