|
@@ -0,0 +1,40 @@
|
|
|
+# Ref:
|
|
|
+# https://blog.hao.dev/how-to-use-different-git-emails-for-personal-and-work-repositories-on-the-same-machine
|
|
|
+[core]
|
|
|
+ sshCommand = /usr/sbin/ssh-ident
|
|
|
+ excludesfile = ~/.gitignore_global
|
|
|
+[user]
|
|
|
+ email = jeremy.mauro@gmail.com
|
|
|
+ name = Jeremy MAURO
|
|
|
+[alias]
|
|
|
+ cox = commit --signoff --trailer "jira:AVXSRE"
|
|
|
+ coxa = commit --signoff --trailer "jira:AVXSRE" --amend
|
|
|
+ rc = rebase --continue
|
|
|
+ unstaged = restore --staged
|
|
|
+ brprune = !"f() { \
|
|
|
+ BRANCH_TO_REMOVE=$(git branch -vv | \
|
|
|
+ grep 'origin/.*: gone]' | \
|
|
|
+ awk '{print $1}') ; \
|
|
|
+ [ -z \"${BRANCH_TO_REMOVE}\" ] || echo ${BRANCH_TO_REMOVE} | xargs git branch -D ;\
|
|
|
+ git branch -av ;\
|
|
|
+ }; f"
|
|
|
+
|
|
|
+[includeIf "gitdir:~/repo/aviatrix/"]
|
|
|
+ path = ~/.gitconfig-work
|
|
|
+[includeIf "gitdir:~/repo/personal/"]
|
|
|
+ path = ~/.gitconfig-personal
|
|
|
+[url "git@github.com:"]
|
|
|
+ insteadOf = https://github.com/
|
|
|
+[url "git@github"]
|
|
|
+ com = .insteadof=https://github.com/
|
|
|
+[credential "https://github.com"]
|
|
|
+ helper =
|
|
|
+ helper = !/usr/bin/gh auth git-credential
|
|
|
+[credential "https://gist.github.com"]
|
|
|
+ helper =
|
|
|
+ helper = !/usr/bin/gh auth git-credential
|
|
|
+[trailer "jira"]
|
|
|
+ key = "JIRA: "
|
|
|
+ ifExists = addIfDifferentNeighbor
|
|
|
+ where = before
|
|
|
+ cmd = "~/.git-templates/hooks/jira_trailer.sh"
|