I use conditional includes to separate my personal projects from work for my employer. Because of this, my .gitconfig
doesn’t directly contain a [user]
section; it’s included dynamically based on the folder I’m working in:
In .gitconfig
[includeIf "gitdir:Work/"]
path = .gitconfig-work
[includeIf "gitdir:Personal/"]
path = .gitconfig-personal
.gitconfig-work
[user]
name = Mark Bell
email = [MY WORK EMAIL]
.gitconfig-personal
[user]
name = Mark Bell
email = [MY PERSONAL EMAIL]
However, this results in Sublime Merge asking me to enter my name and email address when I commit to any repository, presumably because it can’t find them in .gitconfig
and isn’t parsing the conditionals.
As a result, I can’t currently use SM at all, unless I re-specify my credentials for every repository I work on and persist them to the settings for the individual working copy.
I realise mine is a fairly niche use case, but it would be great to get support for this, as it is an established Git feature.
EDIT: Sorry, I have just seen the link to the issue tracker on GitHub, so please ignore this, reposted there instead.