GitHub Configuration Guide

1. Create a project and enter the project folder

2. Please refer to the official website guide for initializing SSH keys. (a pair of keys are generated locally, and public keys are transferred to the official website SSH key) https://help.github.com/articles/generating-ssh-keys/ 3. Initialize user name and mailbox

$git config -- global user.name "defnngj" / / give yourself a user name $git config -- global user.email“ defnngj@gmail.com "/ / fill in your email

4.git init

5.git add .

6.git commit -m "message for this commit"

7.touch README.md

8.git add README.md

9.git status

10. Go to GitHub website to build a repo, such as "ts.git"

11.git remote add origin git@github.com : wuzhuzhu / ts.git if fatal: remote origin already exists. Enter:

git remote rm origin

12.git remote add origin git@github.com :wuzhuzhu/ts.git

13.git push -u origin master

Counting objects: 19,done. Compressing objects: 100% (16/16),done. Writing objects: 100% (19/19),4.54 KiB,done. Total 19 (delta 1),reused 0 (delta 0) To git@github.com :wuzhuzhu/ts.git [new branch] master -> master Branch master set up to track remote branch master from origin.

14. Pull git document: on the remote host:

git remote add origin git@github.com : wuzhuzhu / ts.git git pull origin master problems encountered:

Whether the Windows client needs to use the GIT shell or the network will always report an error when creating a repo. The remote server needs to handle the SSH key... Git remote add origin git@github.com : wuzhuzhu / ts.git refers to setting the origin to the GIT website. Do not bind it repeatedly

The above is a personal simplified version of GitHub configuration. Give a brick to attract jade and give it to your friends for reference

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>