$ repo forall -pvc <command-line>
# repo forall -pvc "git reset --hard HEAD; git pull --rebase"
$ repo init -b <new-branch-name>
$ rm -rf *; $ repo sync $ repo start <new-branch-name>
$ cd ${REPOS_ROOT}/.repo/manifests $ git co -b <local-branch> <remote-branch> $ git pull
$ cd ${REPOS_ROOT}/.repo $ rm -rf projects project-objects; # cache の削除。これを実行すると次の repo sync ではある程度余計に時間が掛かる。
$ cd ${REPOS_ROOT} $ rm -rf * # .repo 以外を全て消す。 manifest から削除された物がある場合には必要な手順となる $ repo sync # ここで、 checkout 済の branch があっても、場合によってはその branch から detach されることがある。 $ repo forall "git checkout <local-branch>; git fetch --unshallow; git fetch --all; git merge"
hoge/.git/の中身が
.repo/projects/<manifestで指定されたパス>/hoge.git .repo/project-objects/<manifestで指定されたパス>/hoge.git配下への SymLink になっており、上記2つの hoge.git 両方揃って初めて完全なリポジトリと同じ状態になるようにできている。
$ rm -rf projects project-objects; # cache の削除