Horje
Undo git commit Code Example
undo commit
# KEEP CHANGES
git reset --soft HEAD~1

# REMOVE CHANGES
git reset --hard HEAD~1
git undo commit
# Uncommit the changes
git reset --soft HEAD~1

# Completely delete the changes
git reset --hard HEAD~1
git cancel last commit
git reset --soft HEAD~1
Undo git commit
$ git reset --soft HEAD~1
Undo git commit
$ git commit -m "Something terribly misguided" # (0: Your Accident)
$ git reset HEAD~                              # (1)
[ edit files as necessary ]                    # (2)
$ git add .                                    # (3)
$ git commit -c ORIG_HEAD                      # (4)
undo git commit
$ git reset HEAD^ 




Shell

Related
download post it for ubuntu Code Example download post it for ubuntu Code Example
remove spotify for ubuntu Code Example remove spotify for ubuntu Code Example
Which command should I use to display the exit code of the previous command? Code Example Which command should I use to display the exit code of the previous command? Code Example
git ignore clear Code Example git ignore clear Code Example
does undo commit delete the code or move it to uncommitted Code Example does undo commit delete the code or move it to uncommitted Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11