How to use github

1. Build warehouse + key, etc.

This tutorial is awesome~

http://www.cnblogs.com/zuibunan/p/3843241.html

Two pits: 1 Create a key, if there is any problem, just follow the default path; 2 git init can not be here

 

2. Common commands

(1) If the online and local are different, pull the code from the online first

git pull origin

git add --all

git commit -m "changes"

 

(2) Add files

git add file.psd

git commit -m "add file"

git push origin master


(3) Delete files:

git rm * .swo

git add --all

git commit -m "delete file" You can write your own in the quotation marks, mainly to say what the operation is doing

git push origin master

git push --set-upstream origin branch1

Guess you like

Origin blog.csdn.net/Sun7_She/article/details/85809523