每个分支的独立存储库 - GitHub

时间:2014-07-25 07:59:48

标签: git github

我对GitGitHub相对较新。我有一个存储库(比如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.鉴于我能够承诺两个项目都没有错误,两者之间是否存在差异?

1 个答案:

答案 0 :(得分:0)

你应该只有一个项目存储库,你真正需要的是分支。

您可以查看有关分支机构的官方文档: http://git-scm.com/book/en/Git-Branching-What-a-Branch-Is