Created
December 6, 2020 21:16
-
-
Save nothub/17944fafeed51f590af27ed0876718a9 to your computer and use it in GitHub Desktop.
directory based gitconfig
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
[user] | |
name = a | |
email = a@foo.bar | |
[includeIf "gitdir:~/work/"] | |
path = ~/work/.gitconfig-work |
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
[user] | |
name = b | |
email = b@foo.bar |
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
# default user | |
Host github.com-a | |
Hostname github.com | |
User git | |
IdentityFile ~/.ssh/a.pub | |
# work user | |
Host github.com-b | |
Hostname github.com | |
User git | |
IdentityFile ~/.ssh/b.pub | |
# nullroute default domain | |
Host github.com | |
Hostname 100.127.255.255 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment