You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

能否使用repo sync指定特定组同步?原同步组后新增组的技术疑问

Can repo sync specify a specific group for synchronization?

Great question! Let's break this down clearly:

First off, the repo sync command does NOT support the -g/--groups flag — this option is exclusive to repo init, which uses it to filter which project groups get included in your local manifest configuration during initialization.

Why your attempt didn't work

When you ran repo init -u git@$1.1.1.1/xyz.git -g A followed by repo sync, Repo already locked in the list of projects from group A in your local manifest setup. Later editing the manifest.xml to add group B doesn't automatically update this local configuration — repo sync will only sync the projects that were already selected during the initial repo init.

Solutions to sync group B

Here are two reliable ways to test group B:

1. Update your local manifest configuration to use group B

You don't need to re-clone everything — just re-run repo init with the -g B flag to overwrite the group filter, then sync:

repo init -u git@$1.1.1.1/xyz.git -g B
repo sync

This will update your local manifest to include only projects from group B, then sync any missing or updated code for those projects. If you want to switch back to group A later, just repeat the same command with -g A.

2. Sync the latest manifest first (if group B was recently added)

If group B was just added to the remote manifest repository, make sure you pull the latest manifest changes first before re-initializing:

# Pull the latest manifest updates
repo sync manifest
# Re-initialize with group B
repo init -u git@$1.1.1.1/xyz.git -g B
# Sync the projects from group B
repo sync

Verify the result

To confirm you're syncing the right group, run repo list — it will show all the projects currently tracked by your local manifest, which should match the projects in group B.

内容的提问来源于stack exchange,提问作者Robber Pen

火山引擎 最新活动