Git practical tutorial

 

1. Git configuration

The first thing to do with Git is to set your name and email. These are your signatures when you submit a commit, and each commit log will contain this information. Use the git config command to configure:


$ git config --global user.name "ilimhumar"
$ git config --global user.email "[email protected]"

 

2. Generate a new ssh key 

Fill in your real and valid email address

$ ssh-keygen -t rsa -C "[email protected]" 

3. Add to ssh-agent

Add the newly generated key to ssh-agent

ssh-agent -s
ssh-add ~/.ssh/id_rsa_gitee

4. Add ssh key to GitHub

Settings > SSH Public Key

5. Test

ssh -vT [email protected]

Welcome to Gitee.com, ilimhumar!

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324954095&siteId=291194637