git¶
Personal git identity + XDG-aware ignore rules. Multi-identity via
includeIf for work repos under ~/work/.
config¶
[user]
name = Nishanth Gobi
email = [email protected]
[rerere]
enabled = true
# Work identity lives outside this repo (machine-local, not tracked).
# Create ~/.config/git/work.local with [user] + signing settings,
# and any repo under ~/work/ will use it.
[includeIf "gitdir:~/work/"]
path = ~/.config/git/work.local
Work identity (machine-local, not tracked)¶
The [includeIf "gitdir:~/work/"] block loads ~/.config/git/work.local
when you're inside any repo under ~/work/. Create that file locally —
do not commit it to dotfiles:
# ~/.config/git/work.local
[user]
name = Work Name
email = [email protected]
signingkey = ~/.ssh/id_git_signing_sk.pub
[commit]
gpgsign = true
[gpg]
format = ssh
[gpg "ssh"]
allowedSignersFile = ~/.config/git/work.allowed_signers
Also create ~/.config/git/work.allowed_signers with one line per allowed
signer (email + SSH pubkey). Both files stay machine-local.
Any repo at ~/work/foo/ → uses work identity + signing.
Anywhere else → uses personal identity, no signing.