我对Git
和GitHub
相对较新。我有一个存储库(比如repo1)和以下.git/config
文件。
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = false
[remote "origin"]
url = git@github-userName:userName/repo1.git
fetch = +refs/heads/*:refs/remotes/origin/*
这个回购有3个分支。我能够承诺所有这些。
另一个存储库(比如repo2)带有以下.git/config
:
core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
[remote "origin"]
url = git@github-userName:userName/repo2.git
fetch = +refs/heads/*:refs/remotes/origin/*
[remote "development"]
url = git@github-userName:userName/repo2_development.git
fetch = +refs/heads/*:refs/remotes/development/*
[remote "dev-epub"]
url = git@github-userName:userName/repo2_dev-epub.git
fetch = +refs/heads/*:refs/remotes/dev-epub/*
[remote "bugfixes"]
url = git@github-userName:userName/repo2_bugfixes.git
fetch = +refs/heads/*:refs/remotes/bugfixes/*
我的问题:
1.两者中哪一个更适合发展目的?
2.在repo1的情况下,Git
如何将分支分开?
3.鉴于我能够承诺两个项目都没有错误,两者之间是否存在差异?
答案 0 :(得分:0)
你应该只有一个项目存储库,你真正需要的是分支。
您可以查看有关分支机构的官方文档: http://git-scm.com/book/en/Git-Branching-What-a-Branch-Is