Last active
March 28, 2025 08:28
-
-
Save katzefudder/3a6e2d8d06d71ae040bf6ca0c98f11d5 to your computer and use it in GitHub Desktop.
just in case you are working on multiple projects (multiple git repositories) - you might have come across the need to have multiple identities regarding GIT. This is my approach
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
# ~/.gitconfig | |
# Different users per project/directory | |
[includeIf "gitdir:~/Code/private_project/"] | |
path = ~/Code/private_project/.gitconfig-private | |
[includeIf "gitdir:~/Code/project/"] | |
path = ~/Code/project/.gitconfig-project |
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
# ~/Code/private_project/.gitconfig-private | |
[user] | |
name = John Doe | |
email = [email protected] |
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
# ~/Code/project/.gitconfig-project | |
[user] | |
name = John Doe | |
email = [email protected] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment