.gitconfig
is usually stored in the user.home
directory.
I use a different identity to work on projects for Company A and something else fo
Find .gitconfig from the system
File Location For Windows : "C:\Users${USER_NAME}.gitconfig"
File Location For Linux : "/usr/local/git/etc/gitconfig"
Open .gitconfig file and add below lines as per your condition
[includeIf "gitdir:D:\ORG-A-PROJECTS\"]
[user]
name = John Smith
email = js@organizationx.com [includeIf "gitdir:~/organization_b/"]
[user]
name = John Doe
email = jd@organizationy.com