git 分支数量限制

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13095482/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 07:41:09  来源:igfitidea点击:

Limit on number of git branches

gitbranchlimitscaling

提问by user1778366

I am musing about building a big system on top of git for various reasonsbut mainly convenience.

出于各种原因,我正在考虑在 git 之上构建一个大系统,但主要是为了方便。

But as part of the implementation I would end up making millions of branches and branching and merging between them. Can git actually scale this way? I always hear "Branches are free" but I have to wonder if this is really true x1,000,000? Can git actually create a theoretical unlimited number of branches?

但作为实现的一部分,我最终会创建数百万个分支,并在它们之间进行分支和合并。git 真的可以这样扩展吗?我总是听到“分支是免费的”,但我想知道这是否真的是 x1,000,000?git 实际上可以创建理论上无限数量的分支吗?

采纳答案by FelipeC

Yes, branches are free. Branching and merging is very easy.

是的,分支机构是免费的。分支和合并非常容易。

The scalability issues mentioned before comes only when synchronizing a vast amount of branches through the network (git fetch, git pull, git push). Locally you shouldn't have any problem.

前面提到的可扩展性问题只有在通过网络同步大量分支(git fetch、git pull、git push)时才会出现。在本地你应该没有任何问题。

回答by qqx

There was a thread about scalability problems in this area on the git mailing list last year, as I recall there were some improvements made but I don't recall off hand what the performance was like with the changes that got incorporated into newer versions as a result.

去年在 git 邮件列表上有一个关于这个领域的可扩展性问题的线程,因为我记得有一些改进,但我不记得随着被合并到新版本中的更改的性能结果。

Here's a link to an archive of that thread:

这是该线程存档的链接:

http://git.661346.n2.nabble.com/Git-is-not-scalable-with-too-many-refs-td6456443.html

http://git.661346.n2.nabble.com/Git-is-not-scalable-with-too-many-refs-td6456443.html