Git installation and configuration on MAC
I changed to a new Mac notebook, and I am not used to it, so I will make a shallow record
1. Install Git
First check whether Git is installed on the computer, terminal input:
git
It was not found, but the computer automatically prompts to install the developer tools. After installation, the test git installation is successful.
Method 2: Install Git through homebrew
:todo (come back and write when you use it)
Two, configure Git
(1) Configure username and email
git config --global user.name "your_name"
git config --global user.email "your_email"
(2) Generate a key
ssh-keygen -t rsa -C "your_email"
save in the default path, passphrase can be empty,
then generate private key and public key, stored in /.ssh path
cat .ssh/id_rsa.pub
View the public key and copy it to GitHub
(3) SSH Keys Add the key
New SSH Key
, start with a title, copy the previous public key and
complete the addition
(4) Link verification
ssh -T git@github.com