github 使用方法

1. 建倉庫+key等

這個教程超級贊哦~

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

兩個坑:1 創建key,如果有啥問題,就按默認的路徑來;2 git init 可以不要here

 

2. 常見命令

(1) 如果網上和本地不同,先從網上pull代碼

git pull origin

git add --all

git commit -m "changes"

 

(2) 增加文件

git add file.psd

git commit -m "add file"

git push origin master


(3) 刪除文件:

git rm *.swo

git add --all

git commit -m "delete file"  引號裏邊可以自己寫,主要是說這次操作是在做什麼

git push origin master

git push --set-upstream origin branch1

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章