git中重要的概念:
- 工作目錄(working directory):在工作目錄中修改檔案,修改後的檔案狀态是modified,新添加的檔案是untracked,通過git add指令将檔案儲存到staging area中;
- staging area:儲存下次即将送出到git repository中檔案的snapshot。檔案狀态是staged,通過git commit指令送出檔案到git repository中;
- git repository:本地倉庫。通過git push指令更新遠端伺服器倉庫,通過git pull指令更新本地倉庫。
開始使用git:
- 在本機上安裝git,http://progit.org/book/
- 使用github充當遠端伺服器,托管本地代碼:www.github.com