0

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?

minghua
  • 5,981
  • 6
  • 45
  • 71
  • On another question: https://stackoverflow.com/questions/49603844/how-do-i-archive-an-aosp-repo-like-git-archive-doing it uses `forall` to iterate through individual git repos. Probably one solution can be like that. – minghua Jul 16 '20 at 16:02

1 Answers1

2

You can use:

repo sync --local-only

From repo help:

$ repo help sync
[...]
-l, --local-only      only update working tree, don't fetch
Hugo y
  • 1,421
  • 10
  • 20