英文:
How can I update the manifest with the checked out commits/branches?
问题
我的 manifest.xml 包含了所有克隆 master
分支的存储库。
我在一些存储库上进行了一些工作,并创建了新的提交、分支和标签。
现在,我想在清单中保存所有这些存储库的位置,以及它们使用的分支、标签或提交。
我应该如何做?我正试图从 git 子模块
切换到 git-repo
。
英文:
My manifest.xml has all my repositories cloning master
.
I do some work on few repositories and create new commits, branches and tags.
Now, I want to save in the manifest where all these repositories are, which branch, tags or commits.
How can I do it? I'm trying to switch from git submodules
to git-repo
.
答案1
得分: 1
要将当前仓库的状态保存到foo.xml中,请运行
repo manifest -r -o foo.xml
确保新的提交已经推送到分支/标签。否则,如果foo.xml用于从foo.xml中指定的远程服务器“repo sync”这些仓库,将会引发错误。
您可以将foo.xml添加并提交到.repo/manifests
,然后将其推送到远程清单仓库,这样您和其他人都可以使用它来“repo sync”具有相同修订版本的相同仓库。
最好不要用foo.xml覆盖manifest.xml。manifest.xml用于下载最新的修订版本,而foo.xml用于下载特定的修订版本。
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论