.gitconfig 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. [user]
  2. email = tom@chillidonut.com
  3. name = Tom McKenzie
  4. signingkey = 896D4BE5
  5. [color]
  6. branch = auto
  7. diff = auto
  8. status = auto
  9. [color "branch"]
  10. current = yellow reverse
  11. local = yellow
  12. remote = green
  13. [color "diff"]
  14. meta = yellow bold
  15. frag = magenta bold
  16. old = red
  17. new = cyan
  18. [color "status"]
  19. added = yellow
  20. changed = green
  21. untracked = cyan
  22. [help]
  23. autocorrect = 10
  24. [alias]
  25. p = push
  26. pp = publish
  27. s = switch
  28. sc = switch create
  29. rb = pull --rebase
  30. rbc = rebase --continue
  31. rba = rebase --abort
  32. l = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(cyan)<%an>%Creset' --abbrev-commit --date=relative
  33. b = for-each-ref --count=10 --sort='-authordate:iso8601' --format=' %(color:green)%(authordate:relative) %09%(color:white)%(objectname:short) %(color:yellow)%(refname:short) %09%(color:white)%(upstream:track) %(contents:subject)' refs/heads --no-merged
  34. edit-conflicted = ! git diff --name-only | uniq | xargs $(echo $EDITOR)
  35. history = log -p --
  36. pushf = push --force-with-lease
  37. pullall = ! git pull && git submodule update --init --recursive --remote
  38. publish = ! git push -u origin `git rev-parse --abbrev-ref HEAD`
  39. diverged = ! git log --graph --date=relative --oneline `git rev-parse --abbrev-ref HEAD` origin/`git rev-parse --abbrev-ref HEAD`
  40. fixup = "!f() { TARGET=$(git rev-parse "$1"); git commit --fixup=$TARGET ${@:2} && EDITOR=true git rebase -i --autostash --autosquash $TARGET^; }; f"
  41. last = rev-list -1 HEAD
  42. [core]
  43. excludesfile = ~/.gitignore_global
  44. whitespace = tab-in-indent,trailing-space,space-before-tab
  45. ignorecase = false
  46. # use delta if installed, else fall back to less (don't break git without delta)
  47. pager = command -v delta >/dev/null 2>&1 && delta || less -R
  48. [push]
  49. default = upstream
  50. [status]
  51. submoduleSummary = true
  52. [merge "npm-merge-driver"]
  53. name = automatically merge npm lockfiles
  54. driver = npx npm-merge-driver merge %A %O %B %P
  55. [pull]
  56. ff = only
  57. [advice]
  58. detachedHead = false
  59. [filter "lfs"]
  60. clean = git-lfs clean -- %f
  61. smudge = git-lfs smudge -- %f
  62. process = git-lfs filter-process
  63. required = true
  64. [include]
  65. path = ~/dotfiles/.gitconfig_difftastic
  66. condition = command -v difft >/dev/null 2>&1
  67. [interactive]
  68. diffFilter = command -v delta >/dev/null 2>&1 && delta --color-only || cat
  69. [delta]
  70. features = decorations
  71. navigate = true
  72. line-numbers = true
  73. hyperlinks = true
  74. [delta "decorations"]
  75. ; commit-decoration-style = bold yellow box ul
  76. ; file-style = bold yellow ul
  77. file-decoration-style = bold
  78. hunk-header-decoration-style = bold
  79. [merge]
  80. conflictStyle = zdiff3
  81. [credential "https://github.com"]
  82. helper =
  83. helper = !gh auth git-credential
  84. [credential "https://gist.github.com"]
  85. helper =
  86. helper = !gh auth git-credential