I’m in a bit of a bind with Git. I’m trying to execute git commit but I need to be able to swtich between ~/.gitconfig1 and ~/.gitconfig2 Is there a command line switch – or anyway to have Git use a different gitconfig file then the ones found at /etc/gitconfig, ~/.gitconfig and .git/config?
I’m in a bit of a bind with Git . I’m trying to execute
Share
I found a way to execute this – it wasn’t elegant but it did work – and so far seems to be the only way to get this to work.
Git uses the
HOMEpath to determine where.gitconfigis. I was able to perform something like this:And when executing Git Commit (which is the only command that requires the
.gitconfig) I override the home path.You can then use alias to do this easily