gitconfig 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. [user]
  2. name = Fabian Peter Hammerle
  3. email = fabian@hammerle.me
  4. signingkey = 8D2902FE7DF47DDEDA2802F9456B9A0399A5DA2F
  5. [core]
  6. excludesfile = ~/.config/git/gitignore
  7. # hooksPath = ~/.config/git/hooks
  8. [interactive]
  9. singleKey = true
  10. [init]
  11. defaultBranch = main
  12. [status]
  13. branch = true
  14. short = true
  15. showUntrackedFiles = normal
  16. [grep]
  17. lineNumber = true
  18. [diff]
  19. tool = vimdiff
  20. [diff "cat"]
  21. textconv = cat
  22. [diff "db_dump"]
  23. textconv = db_dump
  24. [diff "gpg-verify"]
  25. textconv = gpg --verify --output=- 2>&1 --
  26. [diff "hexdump"]
  27. textconv = od -t x1z --
  28. [diff "yq"]
  29. textconv = yq --yaml-output --indentless-lists . --
  30. [diff "openssl-x509-text"]
  31. textconv = "sh -c 'while openssl x509 -noout -text; do echo; done' <\"$1\" 2>&1"
  32. [diff "pgpdump"]
  33. textconv = pgpdump
  34. [diff "xzcat"]
  35. textconv = xzcat
  36. [diff "zcat"]
  37. textconv = zcat
  38. [filter "ipynb"]
  39. clean = jq --indent 1 '.cells[].id? = null | (.cells[].outputs[].data[\"application/vnd.jupyter.widget-view+json\"]|objects|select(has(\"model_id\"))).model_id |= null'
  40. [filter "lfs"]
  41. clean = git-lfs clean -- %f
  42. smudge = git-lfs smudge -- %f
  43. process = git-lfs filter-process
  44. required = true
  45. [commit]
  46. gpgsign = true
  47. verbose = true
  48. [rebase]
  49. instructionFormat = %G? %s (%an <%ae>, %ai)
  50. autostash = true
  51. [push]
  52. default = current
  53. [url "git@git.hammerle.me:"]
  54. pushInsteadOf = https://git.hammerle.me/
  55. [url "git@github.com:"]
  56. pushInsteadOf = https://github.com/
  57. [tag]
  58. forceSignAnnotated = true
  59. [log]
  60. date = iso8601-strict
  61. [gcrypt]
  62. participants = 8D2902FE7DF47DDEDA2802F9456B9A0399A5DA2F
  63. publish-participants = false
  64. [annex]
  65. securehashesonly = true
  66. autocommit = false
  67. synccontent = true
  68. # copy instead of hard-linking when unlocking
  69. thin = false
  70. # assistant: do not auto delete unused files
  71. expireunused = false
  72. # fixes sync of repos inside encfs mounts
  73. ssh-options = -S~/.ssh/%r@%n:%p
  74. [alias]
  75. a = add
  76. c = commit
  77. # git curl-github-api /commits/master/statuses | jq '.[].state'
  78. curl-github-api = "!f() { path="$1"; shift; git github-repo-names | xargs -I{} --verbose curl --header 'Accept: application/vnd.github.v3+json' 'https://api.github.com/repos/{}'\"$path\" "$@"; }; f"
  79. # git curl-github-ref-status dev | jq '{state, statuses, commit_url}'
  80. curl-github-ref-status = "!f() { ref="$1"; shift; git curl-github-api "/commits/$ref/status" "$@"; }; f"
  81. d = diff
  82. f = fetch --prune
  83. github-repo-names = !git github-urls | grep --only-matching --perl-regexp 'github.com/\\K.+(?=\\.git)'
  84. github-urls = !git remote-urls | grep ^https://github.com/
  85. p = push --verbose
  86. remote-urls = !git remote | xargs -L1 git remote get-url
  87. s = status
  88. t = for-each-ref --sort taggerdate --format '%(taggerdate:iso) %(objectname) %(tag)' refs/tags
  89. tree = log --graph --format=format:'%C(red)%G?%C(reset) %C(yellow)%h%C(reset)%C(blue)%d%C(reset) %C(dim green)%ar%C(reset) %C(white)%s%C(reset) %C(dim cyan)(%an, %ai)%C(reset)' --all
  90. x = annex