/configuration/dot-gitconfig

http://github.com/matthewmccullough/git-workshop · #! · 200 lines · 186 code · 14 blank · 0 comment · 0 complexity · 205615e699f906d65131ffa961409e88 MD5 · raw file

  1. [user]
  2. name = Your Name Goes Here
  3. email = yourname@yourcompany.com
  4. [color]
  5. # ui = true is a superset of all the more specific color options
  6. # as documented at http://book.git-scm.com/5_customizing_git.html
  7. # When set to always, always use colors in all git commands which are capable of colored output.
  8. # When false, never. When set to true or auto, use colors only when the output is to the terminal.
  9. # When more specific variables of color.* are set, they always take precedence over this setting.
  10. # Defaults to false.
  11. ui = auto
  12. # diff = auto
  13. # status = auto
  14. # branch = auto
  15. [color "branch"]
  16. current = yellow reverse
  17. local = yellow
  18. remote = green
  19. [color "diff"]
  20. meta = yellow bold
  21. frag = magenta bold
  22. old = red bold
  23. new = green bold
  24. [color "status"]
  25. added = yellow
  26. changed = green
  27. untracked = cyan
  28. [gui]
  29. fontdiff = -family Monaco -size 10 -weight normal -slant roman -underline 0 -overstrike 0
  30. recentrepo = /Users/mccm06/Documents/Temp/Scratch/hello/hgw1
  31. [core]
  32. excludesfile = ~/.gitignore
  33. quotepath = false
  34. autocrlf = input
  35. safecrlf = warn
  36. editor = mate -w
  37. [alias]
  38. br = branch -a
  39. s = status -s -u
  40. cl = log --stat -C -2
  41. c = commit
  42. co = checkout
  43. d = diff --color-words
  44. dh = diff HEAD
  45. dc = diff --staged
  46. dw = diff --word-diff
  47. dcw = diff --color-words
  48. dm = !git diff | mate
  49. dv = !git diff | vim
  50. who = shortlog -s --
  51. ph = push
  52. pl = pull
  53. lp = log -p
  54. lod = log --oneline --decorate
  55. lg = log --graph
  56. lpo = log --pretty=oneline --abbrev-commit --graph --decorate --all
  57. l1 = log --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
  58. l2 = log --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
  59. spull = !git-svn fetch && git-svn rebase
  60. spush = !git-svn dcommit
  61. sync = !git pull && git push
  62. es = !git pull --rebase && git push
  63. lf = log --pretty=fuller
  64. ignorechanges = update-index --assume-unchanged
  65. noticechanges = update-index --no-assume-unchanged
  66. gc-ap = gc --aggressive --prune
  67. listconf = config --global --list
  68. cam = commit -a -m
  69. lsm = log -M --stat
  70. hse = log --stat -5
  71. diffall = diff HEAD
  72. logr = log -M
  73. logr2 = log --stat -M -2
  74. logit = log --stat -M
  75. scrub = !git reset --hard && git clean -fd
  76. pub = !git pub checkout master && git pull && git checkout dev && git rebase master && git checkout master && git merge dev && git wtf
  77. cs = status
  78. rv = remote -v
  79. lwr = log --stat -C
  80. pur = pull --rebase
  81. whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short
  82. orphank = !gitk --all `git reflog | cut -c1-7`&
  83. orphanl = !git --pretty=oneline --abbrev-commit --graph --decorate `git reflog | cut -c1-7`
  84. k = !exec gitk --all&
  85. testecho1 = !sh -c 'echo with slash: zero=$0 one=$1 two=$2' -
  86. # te1 RESULT: with slash: zero=- one=A two=B
  87. testecho2 = !sh -c 'echo without slash: zero=$0 one=$1 two=$2'
  88. # te2 RESULT: without slash: zero=A one=B two=C
  89. st = status
  90. l = log --stat -C
  91. ll = log --stat -C -3
  92. servehere = daemon --verbose --informative-errors --reuseaddr --export-all --base-path=. --enable=receive-pack
  93. servedotgits = !git daemon --verbose --reuseaddr --base-path=. --export-all ./.git
  94. purgeme = !git clean -fd && git reset --hard
  95. prunenow = gc --prune=now
  96. ri = rebase --interactive --autosquash
  97. lol = log --pretty=oneline --abbrev-commit
  98. blg = log --graph --decorate --all --abbrev-commit --pretty=oneline
  99. slog = log --graph --simplify-by-decoration --all --abbrev-commit --pretty=oneline
  100. lgso = log --graph --date=short --pretty=format:'%C(yellow)%h%Creset %cn%x09%cd %s%C(green bold)%d'
  101. ro = !git fetch origin && git reset --hard origin/master
  102. shorten = "!sh -c 'curl -i http://git.io -F url=$1' -"
  103. pushnotes = !sh -c 'git push $1 refs/notes/*' -
  104. fetchnotes = !sh -c 'git fetch $1 refs/notes/*:refs/notes/*' -
  105. showignored = clean -ndX
  106. showignored2 = ls-files --others --ignored --exclude-standard
  107. showuntracked = ls-files --others --exclude-standard
  108. rmmissing = !git rm $(git ls-files --deleted)
  109. mergekeepoursonly = merge -s ours
  110. redocommit = reset --soft HEAD^
  111. listunstaged = diff --name-status
  112. liststaged = diff --name-status --staged
  113. listhistory = log --name-status
  114. logn = log --oneline --name-only
  115. busypeople = shortlog -6
  116. busythisweek = shortlog --since=one.week.ago
  117. configpushtracking = config push.default tracking
  118. configpushnothing = config push.default nothing
  119. configpushtracking = config push.default matching
  120. configpushcurrent = config push.default current
  121. sizes = "!for eachthing in `git rev-list HEAD --all`; do echo `git cat-file -s $eachthing` $eachthing ; done"
  122. emptytree = hash-object -t tree /dev/null
  123. diffemptytreehash = diff -p 4b825dc642cb6eb9a060e54bf8d69288fbee4904
  124. listfetchedcommits = log ORIG_HEAD.. --stat --no-merges
  125. llog = log --date=local
  126. diffnamestatus = diff --name-status
  127. diffstat=diff --stat
  128. whatsjusthappened = !sh -c 'git log $1@{1}..$1@{0} "$@"'
  129. editconflicted = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; $EDITOR `f`"
  130. addconflicted = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; git add `f`"
  131. # Other alias ideas that don't quite work yet
  132. #testnewrepodoesntwork1 = !echo git init $1 && echo cd $1
  133. #testnewrepodoesntwork2 = !sh -c 'git init $1; echo hi' -
  134. #testnewrepodoesntwork3 = "!f() { git init $1}; f"
  135. nr = "!sh -c 'git init $0'"
  136. echoparam1 = "!sh -c 'echo $0'"
  137. #testshfunction = "!function gitme() { git init $1; cd $1; }; gitme"
  138. fixup = "!sh -c 'git commit -m \"fixup! $(git log -1 --format='\\''%s'\\'' $@)\"' -"
  139. squash = "!sh -c 'git commit -m \"squash! $(git log -1 --format='\\''%s'\\'' $@)\"' -"
  140. ccfq = "!sh -c 'git add $1 && git commit -m\"Placeholder\"' -"
  141. bbnl = log --graph --abbrev-commit --decorate --all --pretty=oneline
  142. bbnclean = clean -ndX
  143. [apply]
  144. whitespace = nowarn
  145. [rerere]
  146. enabled = 1
  147. [diff]
  148. tool = araxis
  149. [difftool]
  150. prompt = false
  151. #[difftool "myaraxis"]
  152. # cmd = araxisgitdiff ONE $LOCAL THREE FOUR $REMOTE
  153. [merge]
  154. tool = araxis
  155. [mergetool]
  156. prompt = false
  157. keepBackup = false
  158. #[mergetool "myaraxis"]
  159. # cmd = araxisgitmerge $PWD/$REMOTE $PWD/$BASE $PWD/$LOCAL $PWD/$MERGED
  160. [branch]
  161. # Automatically set up pull to be --rebase
  162. # autosetuprebase = always
  163. [github]
  164. # https://github.com/blog/180-local-github-config
  165. user = yourgithubusername
  166. token = yourgithubtoken
  167. [url "git://github.com/"]
  168. insteadOf = "ghg://"
  169. pushInsteadOf = "ghg://"
  170. # Example: git clone ghg://ntschutta/emacs
  171. [url "git://github.com/matthewmccullough/"]
  172. insteadOf = "ghgm://"
  173. pushInsteadOf = "ghgm://"
  174. # Example: git clone ghgm://hellogitworld
  175. [url "git@github.com:"]
  176. insteadOf = "ghs://"
  177. pushInsteadOf = "ghs://"
  178. [url "git@github.com:matthewmccullough/"]
  179. insteadOf = "ghsm://"
  180. pushInsteadOf = "ghsm://"
  181. [url "https://github.com/"]
  182. insteadOf = "ghh://"
  183. pushInsteadOf = "ghh://"
  184. [url "https://github.com/matthewmccullough/"]
  185. insteadOf = "ghhm://"
  186. pushInsteadOf = "ghhm://"