Guest User

Untitled

a guest
Oct 17th, 2018
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. st = status
  2. co = checkout
  3. cob = checkout --no-track -b
  4. cp = cherry-pick
  5. rb = rebase
  6. rbom = rebase origin/master
  7. rbi = rebase -i
  8. rbiom = rebase -i origin/master
  9. c = commit
  10. ca = commit --amend
  11. can = commit --amend --no-edit
  12. com = commit -m
  13. coma = commit -a -m
  14. aa = add --all
  15. fa = fetch --all -p -v
  16. f = fetch --all -p
  17. r1 = reset HEAD~1
  18.  
  19. # push
  20. p = push
  21. poh = push -u origin HEAD # like first push
  22. pf = push --force-with-lease
  23.  
  24. # log section
  25. l = !git log | tig -FRSX
  26. ll = log --color --all --format='%C(yellow)%h%Creset %cr %C(blue)%cn%Creset -%C(auto)%d%Creset %s'
  27. lg = log --graph --oneline --abbrev-commit --color --decorate
  28. lgt = log --graph --oneline --abbrev-commit --color --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)'
  29. lga = log --graph --oneline --abbrev-commit --color --decorate --all
  30.  
  31. # branch management
  32. bdelete-force = !git branch --no-color | grep -v '*' | grep -v master | xargs --no-run-if-empty git branch -D
  33. bdelete = !git branch --no-color --merged | grep -v '*' | grep -v master | xargs --no-run-if-empty git branch -d
  34. bm = branch -m
  35. recent = for-each-ref --count=10 --sort=-committerdate refs/heads/ --format="%(refname:short)"
  36.  
  37. # alias management
  38. aliases = "!git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\t=> \\2/' | sort"
  39.  
  40. # diff
  41. d = diff
  42. dc = diff --cached
  43. dw = diff -w
  44. dwc = diff -w --cached
  45. da = difftool -d
  46. daw = difftool -d -w
  47. dac = difftool -d --cached
  48. dawc = difftool -d --cached -w
  49.  
  50. # tags
  51. tdelete = fetch --prune origin +refs/tags/*:refs/tags/*
  52. last-tag = describe --abbrev=0 --tags
Add Comment
Please, Sign In to add comment