Taught you how to upload files onto GitHub (acquired ssh key)

How to submit a file to GitHub (already generated ssh key)

1. Create a new folder, as the local repository

2. Initialize the warehouse

$git init

3. Place the things you want to upload a copy to the repository

4. The documents submitted to the staging area

$git add .

4. submission

the commit git $ 
$ git the commit -m 'xxx' // xxx is equivalent to a remark

5. Submit to a remote repository

$git remote add origin https://github.com/guyibang/TEST2.git

6. If you want to change the location of the warehouse

$git remote rm origin 

$git remote add origin https://github.com/guyibang/TEST2.git

7. Submit Upload

$git push origin master
$ Git push -u origin master // uploaded when empty warehouse

8. If an error

failed to push some refs to https://github.com/guyibang/TEST2.git

$ git pull --rebase origin master and then push to complete

 

Guess you like

Origin www.cnblogs.com/crushxz/p/11464928.html