#topicpath(); ///////////////////////////////////////////////////////////////////////////////// * 目次 [#c93151f1] #contents(); ///////////////////////////////////////////////////////////////////////////////// * repo とは [#l4410761] - 複数の git リポジトリからなる開発ツリーを一元管理しやすくするための、 git の wrapper のようなスクリプト - Google がリリースしており、 Android の開発で使用されている - [[本家(gitリポジトリ)>https://gerrit.googlesource.com/git-repo]] ///////////////////////////////////////////////////////////////////////////////// * manifest が更新されているかもしれない場合の更新方法 [#z134839c] - repo sync では manifest は更新されない。 - manifest の branch が "default" になっていて且つ upstream が設定されていない場合は remote branch を upstream とする local branch を作るなどして更新できるようにする -- 下記の前提として、${REPOS_ROOT} に .repo や各リポジトリの実体が配置されているものとする -- manifest の更新 $ cd ${REPOS_ROOT}/.repo/manifests $ git co -b <local-branch> <remote-branch> $ git pull -- manifest からリポジトリのエントリが削除されている場合、 .repo 以下の cache の容量が気になるなら、 cache を一旦消して取り直す。 $ cd ${REPOS_ROOT}/.repo $ rm -rf projects project-objects; # cache の削除。これを実行すると次の repo sync ではある程度余計に時間が掛かる。 -- manifest で管理されている各リポジトリの更新 $ 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" -- "--unshallow" オプションは、 git pull でも使用出来る。このオプションは、 manifest に ''clone-depth="1"'' と記述されてるリポジトリに対して、他の通常のリポジトリと同様、最新まで全ての履歴を local に取得しようとする。 clone-depth が指定されているリポジトリがなければ実行しなくてよい。 ///////////////////////////////////////////////////////////////////////////////// * Links [#sabd22ce] - [[repo のコマンド>http://uenoshin.hatenablog.com/entry/2013/12/20/222419]] - [[git管理ツールRepoを入れてみよう>http://qiita.com/fuuuuumin65/items/12310745a0d3c2319fe1]]