Search code examples
gitrepo

Can repo recurse submodules?


We are starting to use repo ( https://source.android.com/source/using-repo.html ) to manage our multi-repository projects, however some of these repositories are using git submodules. When I do a repo sync, is there a way to basically pass --recursive to the clone it is doing?


Solution

  • The answer is YES. Two options:

    1. in your manifest, you can specify the attribute sync-s="true"
      1. for example <default sync-s="true"/> to apply to all projects
      2. or for a specific project, <project sync-s="true"/>
    2. do it as needed when you sync, with repo sync --fetch-submodules

    repo help manifest really only hints at this capability. Do not define submodules as <project>s as it seems to be suggested, this will screw them up during the checkout phase.