Conditionals in Git Config

We can use conditionals in Git config. In my case I have separate configs for Personal and Work projects and its decided based on directory.

An example `.gitconfig` file:

[user]
    name = Arunvel Sriram
    email = my-personal-email@gmail.com

# work specific gitconfig for all
# projects inside ~/work/ directory
[includeIf "gitdir:~/work/"]
    path = .gitconfig-work

Sample `.gitconfig-work` file:

[user]
    name = Arunvel Sriram
    email = my-work-email@company.com

My .gitconfig file is available here in my dotfiles repo.