Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

Undo commit and unstage all files

# In case you want to undo the last commit and unstage all the files
# you can use the following:
git reset HEAD~;
# or
git reset --mixed HEAD~;
# mixed will reset the index but not the working tree 
# (i.e., the changed files are preserved but not marked for commit)
# and reports what has not been updated. This is the default action.
Source by bytefreaks.net #
 
PREVIOUS NEXT
Tagged: #Undo #commit #unstage #files
ADD COMMENT
Topic
Name
5+2 =