Last active
July 7, 2021 17:08
-
-
Save jonatassaraiva/d641c0417429e9bd0c324f538decc0f5 to your computer and use it in GitHub Desktop.
Config Mult GIT
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
# Existing SSH keys | |
> ls -al ~/.ssh | |
# Generate id_rsa | |
ssh-keygen -t rsa -b 4096 -C "your_email@example.com" | |
# Copy the SSH key to your clipboard. | |
> pbcopy < ~/.ssh/id_rsa.pub | |
# Generate id_rsa devops | |
ssh-keygen -t rsa -b 4096 -C "your_email@example.com" | |
# Copy the SSH key to your clipboard. | |
> pbcopy < ~/.ssh/id_rsa_devops.pub |
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
# ~/.ssh/config | |
# Personal account, - the default config | |
Host github.com | |
HostName github.com | |
User git | |
IdentityFile ~/.ssh/id_rsa | |
# Work id_rsa_devops devops | |
Host ssh.dev.azure.com | |
HostName ssh.dev.azure.com | |
User git | |
IdentityFile ~/.ssh/id_rsa_devops |
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
[alias] | |
undo = reset --soft HEAD~1 | |
st = status | |
[user] | |
name = <ame> | |
email = <email> | |
[includeIf "gitdir:~/workspace/work/"] | |
path = ~/workspace/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 = <name> | |
email = <work-email> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment