Git子模块的替代品? [英] Alternatives to Git Submodules?

查看:241
本文介绍了Git子模块的替代品?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我觉得使用Git子模块在我的开发工作流程中有些麻烦.我听说过Git子树和Gitslave.

I feel that using Git submodules is somehow troublesome for my development workflow. I've heard about Git subtree and Gitslave.

  • 是否有更多用于多个存储库项目的工具,它们之间的比较如何?
  • 这些工具可以在Windows上运行吗?

推荐答案

哪种最适合您取决于您​​的需求,期望和工作流程.从某种意义上讲,它们是半同构的,只是在某些特定任务上,它们比其他方法更容易使用.

Which is best for you depends on your needs, desires, and workflow. They are in some senses semi-isomorphic, it is just some are a lot easier to use than others for specific tasks.

  • gitslave 在控制子项目和在子项目上进行开发的时间比较少时很有用超级项目,此外,当您通常想同时标记,分支,推入,拉入等所有存储库时. gitslave从未在我所知道的Windows上进行过测试.它需要perl.

  • gitslave is useful when you control and develop on the subprojects at more of less the same time as the superproject, and furthermore when you typically want to tag, branch, push, pull, etc all repositories at the same time. gitslave has never been tested on windows that I know of. It requires perl.

git-submodule 当您不控制子项目,或者更具体地希望将子项目固定在特定的修订版本时,即使子项目发生更改,它也会更好. git-submodule是git的标准部分,因此可以在Windows上使用.

git-submodule is better when you do not control the subprojects or more specifically wish to fix the subproject at a specific revision even as the subproject changes. git-submodule is a standard part of git and thus would work on windows.

git-subtree 为git的内置子树合并提供了前端战略.当您更希望有一个单一存储库的统一" git历史记录时,它会更好.与子树合并策略不同,它更容易将对不同(目录)树的更改导出回原始项目,但是它不像gitslave甚至git-submodule那样自动.

git-subtree provides a front-end to git's built-in subtree merge strategy. It is better when you prefer to have a single-repository "unified" git history. Unlike the subtree merge strategy, it is easier to export changes to the different (directory) trees back out to the original project, but it is not as automatic as it is with gitslave or even git-submodule.

repo 在理论上类似于gitslave,但不对于我发现的非Android操作,有据可查.它专用于Google Android开发模型,仅本地支持少数git命令(尽管您可以运行任意命令),而有限的本地支持则不支持,例如,用于推送和签出分支似乎相当困难.

repo is in theory similar to gitslave, but not as well documented for non-android operations that I have found. It is fairly dedicated to the Google Android development model and only natively supports a handful of git commands (though you can run arbitrary commands) and the limited native support doesn't support, for example, a centralized repository to push to and checking out a branch seems fairly difficult.

kitenet的 mr 在使用中,但由于其最低的公分母方法,因此仅限于纯git超级项目.有多种方法可以运行任意命令,但它们集成得不够好.

kitenet's mr is what you would want to use if you have multiple version control systems in use, but is mostly limited for git-only superprojects due to its lowest common denominator approach. There are ways to run arbitrary commands, but they are not as well integrated.

这篇关于Git子模块的替代品?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆