开发者

What are the pros and cons of Git submodule and Repo? [duplicate]

This question already has answ开发者_如何转开发ers here: What is Repo and Why does Google use it? (5 answers) Closed 2 years ago.

It just so happens that we share a library between 3 different mobile platforms. There is much debate within the office on what is the best tool to use to manage this library. Repo (Android) from what I read is a tool built on top of Git used for managing the hundreds of Git repositories used for Android, whilst Git submodule is already part of Git.

We would ideally like to have this library in a separate repository and be able to simply integrate it within each of the different mobile applications.

What are the pros and cons of using git submodule or Repo as approaches for managing a shared library that is used between various platforms?


Git submodules is built for this. We've been using submodules for libraries and more. The progit.org/book has a great chapter about submodules and shows an example of upgrading a library from one version to another.


The main difference is that Git submodule tracks and Repo does not. The result is that checking out an exact commit of an old version is only possible with git.

The second most important difference is that Git is popular and Repo is not. The result is that finding solutions for Git is faster.

Maybe the only reason Repo exists is that Git submodule did not exist at the time of Repo's creation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜