Guest User

Untitled

a guest
Dec 16th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. ## UNDO GIT MERGE
  2. # lists undo history for your repo, it references logs
  3. git reflog
  4.  
  5. # resets to specific commit (eg. al commit 18)
  6. git reset --hard HEAD@{18}
  7.  
  8. ## RESET TO LAST PUSH
  9. git checkout .
  10.  
  11. ## UNSTAGE FILES
  12. git reset HEAD -- .
  13.  
  14. ## UNDO COMMIT
  15. # undo commit that was not pushed, while keeping the changes in the current branch
  16. git reset HEAD~1 --soft
  17.  
  18. ## ADD NEW CHANGES TO LAST COMMIT
  19. git commit --amend --no-edit
Add Comment
Please, Sign In to add comment