Más contenido relacionado
La actualidad más candente (20)
版本控制
- 6. 術語
CVCS & DVCS
git 是DVCS
版本庫(Repository)
存儲檔案的新版本還有歷史資料的地方。
提交(Commit)
將修改送回檔案庫。
- 9. git 來源
git 是一個由Linux Torvalds為了更好地管理Linux核心
開發而創立的。
git 與常用的版本控制工具 CVS, Subversion 等不同,
它採用了分散式版本庫的方式,不必伺服器端軟體支
持,使原始碼的發布和交流極其方便。
git 的速度很快,git 最為出色的是它的合併跟蹤
(merge tracing)能力。
- 10. git 特點
hooks 存儲鉤子的文件夾
logs 存儲日誌的文件夾
refs 存儲指向各個分支的指針(SHA-1標識)文件
objects 存放git對象
config 存放各種設置文檔
HEAD 指向當前所在分支的指針文件路徑,一般指向refs下
的某文件
- 12. git 三種區域
Working tree Working Staging
Repository
tree area
Staging area
Checkout the Project
Repository
Stage Files
Commit
- 13. Git Repository服務
免費的
服務商 空間 公開原始碼
私人空間
unlimited projects, up
GitEnterprise 1G NO
to 10 users
repo.or.cz 400M YES NO
bettercodes.org 2G YES YES
GitHub 300M YES NO
Codesion 200M YES 1 user only
Codaset 500M YES NO
1 project, 2
Codebase 20M No public access
collaborators
1 project, 2
Unfuddle 200M YES
collaborators
- 14. git init
ssh-keygen –t rsa –C “Your email”
確認SSH Keys
設定Public SSH Key
git config –global user.name “Your Name”
git config –global user.email “Your email”
- 16. git 路徑
SSH --安全性最佳
HTTP/HTTPS --速度最差,但能突破防火牆限制
git protocol –速度快,但缺乏認證機制
File本機目錄
- 17. git add
git add .
git add’modified file’
git rm
git mv
- 19. git push
git push
git push –u origin master
git commit –a –m ‘commit note’