2015年3月21日 星期六

GIThub

1.第一次初始
在Github開repo
git clone [clone URL] 先把code從Github抓下來
2.
進到該目錄中
git branch [branch-name] 生一個新branch
git checkout [branch-name] 切換到此branch上
3.
git status 看修改了哪些檔案
git add [修改到的檔案] 一個檔一個檔自己加,因為這樣可以Double check自己到底改了哪些檔
git commit 註解要寫清楚 完成一個小功能就要commit一次
重複步驟3.直到 git status 顯示沒有任何修改過的檔案
4.
git checkout master
git merge [branch-name] 和master merge起來
git push 然後接著輸入Github的帳號密碼
如果只有一人work,每次的流程就是跑 2.~4.

http://tech.marsw.tw/blog/2013/08/16/git-notes-github
http://pcottle.github.io/learnGitBranching/
http://rogerdudler.github.io/git-guide/index.zh.html


  • commit
  • branch
  • checkout
  • cherry-pick
  • reset
  • revert
  • rebase
  • merge

推送到遠端主機


登記oeirgin
 git remote add origin https://github.com/taiyan33/TaiLocaRepo.git


git push

git push origin master


教學 http://note.tc.edu.tw/818.html

沒有留言:

張貼留言