如何使用 Android repo 工具检查现有功能分支

Joh*_*hee 2 repo

thebranch一位同事使用创建了功能分支repo start。现在我想检查这个分支并对其进行处理。我试试这个:

repo init -u git@gitserver:manifest.git -m all.xml
repo sync
repo branches              # Responds "(no branches)"
repo checkout thebranch    # Responds "error: no project has branch thebranch"
Run Code Online (Sandbox Code Playgroud)

如何查看其他人开始使用的功能分支repo start

Joh*_*hee 5

前往每个存储库查看功能分支,从而设置跟踪分支:

repo forall -p -c git checkout thebranch
Run Code Online (Sandbox Code Playgroud)

-p选项的意思是“在输出之前显示项目标题”,并且还进行分页,并且可以省略。

现在你可以这样做repo checkout

repo checkout thebranch
Run Code Online (Sandbox Code Playgroud)