Guest User

Untitled

a guest
Jun 20th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. f = fetch
  2. # updates your branch with upstream (if fast-forward is possible)
  3. ff = !git merge --ff-only `git rev-parse --symbolic-full-name --abbrev-ref=strict HEAD@{u}`
  4. fp = fetch --prune
  5. st = status
  6. cm = commit
  7. cma = commit --amend
  8. br = branch
  9. co = checkout
  10. cp = cherry-pick
  11. df = diff
  12. rb = rebase
  13. rbi = rebase -i --autosquash
  14. rbc = rebase --continue
  15. rh = reset --hard
  16. su = submodule update
  17. # graph for current branch
  18. l = log --graph --decorate --pretty=oneline --abbrev-commit
  19. # graph for all branches
  20. ll = log --graph --decorate --pretty=oneline --abbrev-commit --all
  21. # graph for all branches including commit time and author
  22. lll = log --graph --decorate --all --date-order \"--pretty=format:%C(yellow)%h%C(reset)%C(auto)%d %s %C(green)(%ai%x08%x08%x08%x08%x08%x08)%C(reset) %C(blue)<%an>%C(reset)\"
  23. # log for current branch showing diffs (-m is for showing mergecommits too)
  24. ld = log -p -m
  25. # log for current branch showing summary of changed files (-m is for showing mergecommits too)
  26. ls = log --stat -m
  27. # number of commits for each person
  28. stats = shortlog -n -s --no-merges
  29. # remove remote branch (remote must be named origin), usage: git rmb test
  30. rmb = !sh -c 'git push origin :$1' -
  31. # shows local > tracked remote
  32. brt = for-each-ref --format=\"%(refname:short) > %(upstream:short)\" refs/heads
  33. # get upstream tracked branch or error
  34. brtracked = rev-parse --symbolic-full-name --abbrev-ref=strict HEAD@{u}
  35. # commit all changes to a WIP commit
  36. wip = !git add $(git rev-parse --show-toplevel) && git commit -m WIP
  37. # reset last WIP commit
  38. unwip = "!sh -c 'if [ -n \"$(git log -n 1 --format=\\\"format:%s\\\"|grep WIP)\" ]; then git reset --soft HEAD~1; else echo \"No WIP to unwip\"; fi'"
Add Comment
Please, Sign In to add comment