Created
September 12, 2017 06:17
-
-
Save gbhasha/0230971eb1376153ad1387af490c1572 to your computer and use it in GitHub Desktop.
Load user level git config based on the working folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put below code in ~/.gitconfig | |
[includeIf "gitdir:~/Projects/personal/"] | |
path = ~/.gitconfig-personal | |
[includeIf "gitdir:~/Projects/project1/"] | |
path = ~/.gitconfig-project1 | |
[includeIf "gitdir:~/Projects/project2/"] | |
path = ~/.gitconfig-project1 | |
# put below code in ~/.gitconfig-project1 | |
[user] | |
name= Galeel Bhasha Satthar | |
email= username@domain1.com | |
# put below code in ~/.gitconfig-project2 | |
[user] | |
name= Galeel Bhasha Satthar | |
email= username@domain2.com | |
# put below code int ~/.gitconfig-personal | |
[user] | |
name = Galeel Bhasha Satthar | |
email = username@gmail.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment