From 57a5eb02470f5ea49feb49c2b2eec6db948ec1ad Mon Sep 17 00:00:00 2001 From: Erin Date: Mon, 24 Jul 2023 23:42:20 -0400 Subject: [PATCH] git: do per-server identities properly --- git/.config/git/personal.gitconfig | 5 ----- git/.config/git/servers/git.ewin.moe.gitconfig | 4 ++++ git/.config/git/servers/github.com.gitconfig | 4 ++++ git/.gitconfig | 6 ++++++ 4 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 git/.config/git/servers/git.ewin.moe.gitconfig create mode 100644 git/.config/git/servers/github.com.gitconfig diff --git a/git/.config/git/personal.gitconfig b/git/.config/git/personal.gitconfig index 91144b2..fdd32b5 100644 --- a/git/.config/git/personal.gitconfig +++ b/git/.config/git/personal.gitconfig @@ -1,8 +1,3 @@ -# User identity -[user] - name = Erin - email = github@eritbh.me - # Command aliases [alias] l = log --oneline --decorate --graph diff --git a/git/.config/git/servers/git.ewin.moe.gitconfig b/git/.config/git/servers/git.ewin.moe.gitconfig new file mode 100644 index 0000000..c4d341c --- /dev/null +++ b/git/.config/git/servers/git.ewin.moe.gitconfig @@ -0,0 +1,4 @@ +# settings for repositories in ~/src/git.ewin.moe +[user] + name = Erin + email = git@ewin.moe diff --git a/git/.config/git/servers/github.com.gitconfig b/git/.config/git/servers/github.com.gitconfig new file mode 100644 index 0000000..dc0d82f --- /dev/null +++ b/git/.config/git/servers/github.com.gitconfig @@ -0,0 +1,4 @@ +# settings for repositories in ~/src/github.com +[user] + name = Erin + email = github@eritbh.me diff --git a/git/.gitconfig b/git/.gitconfig index 6135354..2a3b9ed 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -1,2 +1,8 @@ [include] path = ~/.config/git/personal.gitconfig + +# Pull in additional config files for per-server identity +[includeIf "gitdir:~/src/github.com/"] + path = ~/.config/git/servers/github.com.gitconfig +[includeIf "gitdir:~/src/git.ewin.moe/"] + path = ~/.config/git/servers/git.ewin.moe.gitconfig