Search code examples
repogit-repo

git-repo (aosp repo) tool checking-out projects again from local cache


We use the google git-repo tool (aosp repo) to manage a workspace of many git repositories. However, if you want to do a clean checkout that is exactly the same as the last workspace, using the command repo sync will pull in all the changes from remotes first.

How can you get the local repositories populated from only the local cache that is currently in the .repo/ directory?


Solution

  • You can use:

    repo sync --local-only
    

    From repo help:

    $ repo help sync
    [...]
    -l, --local-only      only update working tree, don't fetch