Guest User

Untitled

a guest
Jun 24th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. ```bash
  2. git commit --amend
  3.  
  4. git commit --fixup head~0
  5. git rebase -i head~2
  6.  
  7. git reflog
  8.  
  9. git reset
  10. git reset --hard
  11.  
  12. git checkout <branch_name> -- src/path/to/file.js
  13. # it will discard any uncommitted changes in that file.
  14. git checkout HEAD file/to/restore.ext
  15. git show master:src/path/to/file.js
  16.  
  17. git diff
  18. git diff --cached
  19. git diff | clip
  20.  
  21. git reset --hard origin/<branch_name>
  22.  
  23. git status -s
  24.  
  25. git push -u origin <branch_name>
  26.  
  27. git stash
  28. git stash -m <message>
  29. git stash apply
  30. git stash pop
  31. git stash list
  32. git stash show
  33. git stash show -p
  34. git stash show -p stash@{1}
  35.  
  36. # effectively just wind back to a state prior to your last commit,
  37. # but leave your changes in the index
  38. # (as if you had done a git add, but not yet a git commit)
  39. git reset --soft HEAD^
  40. ```
Add Comment
Please, Sign In to add comment