.gitconfig is usually stored in the user.home directory. I use a different identity to work on projects for Company A and something else for Company B (primarily the name / email). How can I have two different Git configurations so that my check-ins don't go with the name / email? |
As of git version 2.13, git supports conditional configuration includes. In this example we clone Company A's repos in global directory anywhere in my computer, and Company B's repos in some other specific folder like D:/Mine/Projects. For company B, we will keep all our repo's inside D:/Mine/Projects |
File Location For Windows : "C:\Users\${USER_NAME}\.gitconfig", follow below steps to make it work:
|
Wednesday, January 11, 2023
How to Use .gitconfig's includeIf - Git 2.13 conditional config on windows - git set username and email for separate project - Is it possible to have different Git configuration for different projects?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment