gitconfig 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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 "csv-to-yaml"]
  23. textconv = csv-to-yaml
  24. [diff "db_dump"]
  25. textconv = db_dump
  26. [diff "gpg-show-keys"]
  27. textconv = gpg --show-keys --with-subkey-fingerprint --with-keygrip --
  28. [diff "gpg-verify"]
  29. textconv = gpg --verify --output=- 2>&1 --
  30. [diff "hexdump"]
  31. textconv = od -t x1z --
  32. [filter "truncate-mac-address-to-24-bits"]
  33. clean = sed -E -e 's/\\b([[:xdigit:]]{2}(:[[:xdigit:]]{2}){2})(:[[:xdigit:]]{2}){3}\\b/\\1:…/g' -e 's/(-bccb-40e7-8e6c-[[:xdigit:]]{6})[[:xdigit:]]{6}\\b/\\1…/gI'
  34. smudge = cat
  35. required = true
  36. [diff "yq"]
  37. textconv = yq --yaml-output --indentless-lists . --
  38. [diff "openssl-x509-text"]
  39. textconv = "sh -c 'while openssl x509 -noout -text; do echo; done' <\"$1\" 2>&1"
  40. [diff "pandas-parquet-to-json"]
  41. # g+r for podman container
  42. # https://git.hammerle.me/fphammerle/setup/commit/9c7167b9a9f7e5829d1fba5006b104ab72f6d13a
  43. textconv = "chmod g+r \"$1\" && env --debug -- pandas-parquet-to-json"
  44. [diff "pgpdump"]
  45. textconv = pgpdump
  46. [diff "xzcat"]
  47. textconv = xzcat
  48. [diff "zcat"]
  49. textconv = zcat
  50. [filter "ipynb"]
  51. clean = jq --indent 1 '.cells[].id? = null | (.cells[].outputs[].data[\"application/vnd.jupyter.widget-view+json\"]|objects|select(has(\"model_id\"))).model_id |= null'
  52. [filter "lfs"]
  53. clean = git-lfs clean -- %f
  54. smudge = git-lfs smudge -- %f
  55. process = git-lfs filter-process
  56. required = true
  57. [filter "meshtastic-firmware-config"]
  58. clean = "yq --yaml-output --indentless-lists '.channel_url = \"…\" | .config.bluetooth.fixedPin = \"…\" | .module_config.ambientLighting.blue = \"…\" | .module_config.ambientLighting.green = \"…\" | .module_config.ambientLighting.red = \"…\"' --"
  59. [commit]
  60. gpgsign = true
  61. verbose = true
  62. [rebase]
  63. instructionFormat = %G? %s (%an <%ae>, %ai)
  64. autostash = true
  65. [push]
  66. default = current
  67. [url "git@git.hammerle.me:"]
  68. pushInsteadOf = https://git.hammerle.me/
  69. [url "git@github.com:"]
  70. pushInsteadOf = https://github.com/
  71. [tag]
  72. forceSignAnnotated = true
  73. [log]
  74. date = iso8601-strict
  75. [gcrypt]
  76. participants = 8D2902FE7DF47DDEDA2802F9456B9A0399A5DA2F
  77. publish-participants = false
  78. [annex]
  79. securehashesonly = true
  80. autocommit = false
  81. synccontent = true
  82. # copy instead of hard-linking when unlocking
  83. thin = false
  84. # assistant: do not auto delete unused files
  85. expireunused = false
  86. # fixes sync of repos inside encfs mounts
  87. ssh-options = -S~/.ssh/%r@%n:%p
  88. [alias]
  89. a = add
  90. c = commit
  91. # git curl-github-api /commits/master/statuses | jq '.[].state'
  92. 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"
  93. # git curl-github-ref-status dev | jq '{state, statuses, commit_url}'
  94. curl-github-ref-status = "!f() { ref="$1"; shift; git curl-github-api "/commits/$ref/status" "$@"; }; f"
  95. d = diff
  96. f = fetch --prune
  97. github-repo-names = !git github-urls | grep --only-matching --perl-regexp 'github.com/\\K.+(?=\\.git)'
  98. github-urls = !git remote-urls | grep ^https://github.com/
  99. p = push --verbose
  100. remote-urls = !git remote | xargs -L1 git remote get-url
  101. s = status
  102. t = for-each-ref --sort taggerdate --format '%(taggerdate:iso) %(objectname) %(tag)' refs/tags
  103. 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
  104. x = annex