What are the pros and cons of Git submodule and Repo?

binarycreations picture binarycreations · Jun 14, 2011 · Viewed 9k times · Source

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?

Answer

Adam Dymitruk picture Adam Dymitruk · Jun 15, 2011

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.

Hope this helps