Created
November 20, 2020 02:55
-
-
Save hpieroni/676bc3fa4af71e69330de6f6b10ade41 to your computer and use it in GitHub Desktop.
.gitconfigs per directory or repo
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
# As of git version 2.13, git supports conditional configuration includes. | |
# In this example we clone Company A's repos in ~/company_a directory, and Company B's repos in ~/company_b. | |
[user] | |
name = John Smith | |
email = john.smith@example.com | |
# If the pattern ends with /, ** will be automatically added. | |
# For example, the pattern foo/ becomes foo/**. In other words, it matches "foo" and everything inside, recursively. | |
[includeIf "gitdir:~/company_a/"] | |
path = .gitconfig-company_a |
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
# You can set new values or override those in .gitconfig | |
[user] | |
name = J.Smith | |
email = jsmith@companya.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment