Posted By

nerdfiles on 02/03/12


Tagged

Bash git aliases


Versions (?)

git aliases


 / Published in: Bash
 

Personal git aliases.

  1. [user]
  2. name = [name]
  3. email = [email]
  4. user = [user]
  5. token = [api_key]
  6. [core]
  7. excludesfile = /Users/[user]/.gitignore
  8. legacyheaders = false # >git 1.5
  9. quotepath = false
  10. whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol
  11. pager = less -r
  12. # if � doesn�t work, try: pager = less -+$LESS -FRX
  13. # http://stackoverflow.com/questions/136178/git-diff-handling-long-lines
  14. [color]
  15. ui = auto
  16. interactive = auto
  17. [repack]
  18. usedeltabaseoffset = true # >git 1.5
  19. [alias]
  20. s = status
  21. a = !git add . && git status
  22. au = !git add -u . && git status
  23. aa = !git add . && git add -u . && git status
  24. c = commit
  25. cm = commit -m
  26. ca = commit --amend # careful
  27. ac = !git add . && git commit
  28. acm = !git add . && git commit -m
  29. lg = log -p
  30. ls = ls-files
  31. lol = log --graph --decorate --pretty=oneline --abbrev-commit
  32. lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
  33. l = log --graph --all --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(white)- %an, %ar%Creset'
  34. ll = log --stat --abbrev-commit
  35. d = diff --color-words
  36. dc = diff --cached
  37. dh = diff --color-words head
  38. untrack = update-index --assume-unchanged
  39. ign = ls-files -o -i --exclude-standard
  40. up = push -u origin
  41. down = pull -u origin
  42. master = checkout master
  43. dev = checkout dev
  44. staging = checkout staging
  45. local = !git fetch origin && git reset --hard # origin/branch
  46. spull = svn rebase
  47. spush = svn dcommit
  48. alias = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\\t => \\2/' | sort
  49. [diff]
  50. renames = copies
  51. # git does copy/rename *detection*. if you want it to track copies/renames:
  52. # http://stackoverflow.com/questions/1043388/record-file-copy-operation-with-git
  53. [color "branch"]
  54. current = yellow reverse
  55. local = yellow
  56. remote = green
  57. [color "diff"]
  58. meta = yellow bold
  59. frag = magenta bold
  60. old = red bold
  61. new = green bold
  62. whitespace = red reverse
  63. [color "status"]
  64. added = yellow
  65. changed = green
  66. untracked = cyan

Report this snippet  

You need to login to post a comment.