gitconfig 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # Ref:
  2. # https://blog.hao.dev/how-to-use-different-git-emails-for-personal-and-work-repositories-on-the-same-machine
  3. [core]
  4. sshCommand = /usr/sbin/ssh-ident
  5. excludesfile = ~/.gitignore_global
  6. [user]
  7. email = jeremy.mauro@gmail.com
  8. name = Jeremy MAURO
  9. [alias]
  10. cox = commit --signoff --trailer "jira:AVXSRE"
  11. coxa = commit --signoff --trailer "jira:AVXSRE" --amend
  12. rc = rebase --continue
  13. unstaged = restore --staged
  14. brprune = !"f() { \
  15. BRANCH_TO_REMOVE=$(git branch -vv | \
  16. grep 'origin/.*: gone]' | \
  17. awk '{print $1}') ; \
  18. [ -z \"${BRANCH_TO_REMOVE}\" ] || echo ${BRANCH_TO_REMOVE} | xargs git branch -D ;\
  19. git branch -av ;\
  20. }; f"
  21. [includeIf "gitdir:~/repo/aviatrix/"]
  22. path = ~/.gitconfig-work
  23. [includeIf "gitdir:~/repo/personal/"]
  24. path = ~/.gitconfig-personal
  25. [url "git@github.com:"]
  26. insteadOf = https://github.com/
  27. [url "git@github"]
  28. com = .insteadof=https://github.com/
  29. [credential "https://github.com"]
  30. helper =
  31. helper = !/usr/bin/gh auth git-credential
  32. [credential "https://gist.github.com"]
  33. helper =
  34. helper = !/usr/bin/gh auth git-credential
  35. [trailer "jira"]
  36. key = "JIRA: "
  37. ifExists = addIfDifferentNeighbor
  38. where = before
  39. cmd = "~/.git-templates/hooks/jira_trailer.sh"