To save the status of the current repositories to foo.xml, run
repo manifest -r -o foo.xml
Make sure the new commits have been pushed to the branches/tags. Otherwise, it would raise errors if foo.xml is used to repo sync
these repositories from the remote server specified in foo.xml.
You can add and commit foo.xml in .repo/manifests
and push it to the remote manifest repository, so that you and others can use it to repo sync
the same repositories with the same revisions.
It's better not to overwrite manifest.xml with foo.xml. The manifest.xml is used to download the latest revision, and foo.xml is used to download the specific revision.