第 4 章 版本控制
▸ config 設定檔
.../webapps/git/blog/.git/config
[core]
repositoryformatversion = 0
filemode = true
logallrefupdates = true
[remote "origin"]
url = https://github.com/gitUser/blog
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
▸ .gitignore 設定檔
.../webapps/git/blog/blog/.gitignore
*~
__pycache__
*.pyc
▸ 協同開發者的 config 設定檔
✶ A 的 config
[core]
...
[remote "origin"]
url = https://github.com/gitUserA/blog
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
...
[remote "base"]
url = https://github.com/gitUserC/blog
fetch = +refs/heads/*:refs/remotes/origin/*
✶ B 的 config
[core]
...
[remote "origin"]
url = https://github.com/gitUserB/blog
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
...
[remote "base"]
url = https://github.com/gitUserC/blog
fetch = +refs/heads/*:refs/remotes/origin/*
▸ 本章完成專案:blog4.zip
.../webapps/git/blog/blog/.gitignore
*~ __pycache__ *.pyc
▸ 協同開發者的 config 設定檔
✶ A 的 config
[core] ... [remote "origin"] url = https://github.com/gitUserA/blog fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] ... [remote "base"] url = https://github.com/gitUserC/blog fetch = +refs/heads/*:refs/remotes/origin/*
✶ B 的 config
[core] ... [remote "origin"] url = https://github.com/gitUserB/blog fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] ... [remote "base"] url = https://github.com/gitUserC/blog fetch = +refs/heads/*:refs/remotes/origin/*