Created
December 17, 2021 22:05
-
-
Save elmodos/94751a2c0d138df599e014ada534f039 to your computer and use it in GitHub Desktop.
GitHub with multiple repos and usernames on single machine
This file contains hidden or 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 | |
[user] | |
name = Personal Name | |
email = [email protected] | |
[includeif "gitdir:~/Projects/Company/"] | |
path = Projects/Company/gitconfig-company |
This file contains hidden or 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
~/.ssh/config | |
Host * | |
AddKeysToAgent yes | |
UseKeychain yes | |
IdentityFile ~/.ssh/id_rsa_personal | |
Host github-company | |
HostName github.com | |
User git | |
IdentityFile ~/.ssh/id_rsa_company |
This file contains hidden or 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
~/Projects/Company/gitconfig-company | |
[user] | |
name = Business Name | |
email = [email protected] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
then instead of
use