touch ~/.gitignore_global
echo ".DS_Store" >> ~/.gitignore_global
echo "._.DS_Store" >> ~/.gitignore_global
echo "**/.DS_Store" >> ~/.gitignore_global
echo "**/._.DS_Store" >> ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
ssh-keygen -t ed25519 -C "your_email@example.com"
> Enter passphrase (empty for no passphrase): [PRESS ENTER]
> Enter same passphrase again: [PRESS ENTER]
pbcopy < ~/.ssh/id_rsa.pub
https://github.com/settings/keys
git config --global user.email "your_email@example.com"
git config --global user.name "your_username"
ssh-keygen -t ed25519 -C "your_email@example.com"
Enter a file in which to save the key (/Users/YOU/.ssh/id_ed25519_<github username>
:
Type: id_ed25519_<github username>
, [PRESS ENTER].
ssh-add --apple-use-keychain ~/.ssh/id_ed25519_<github username>
(umask 077; touch ~/.ssh/config)
Host <main github username>
User git
IdentityFile ~/.ssh/id_ed25519_<main github username>
Host <alternative github username>
HostName github.com
User git
IdentityFile ~/.ssh/id_ed25519_<alternative github username>
git remote set-url origin git@<github username>:<orgnaization>/<repo>.git
git config user.email "<github email>"
git config user.name "<github username>"