諸城網(wǎng)絡(luò)營銷免費(fèi)發(fā)seo外鏈平臺(tái)
repo命令是Google開發(fā)的用于管理Android版本庫的一個(gè)工具。
repo命令并不是用于取代git,而是用Python對git進(jìn)行了一定的封裝,簡化了對多個(gè)Git版本庫的管理。
-
repo init -u -b -m <manifest 文件名稱>
-
repo sync
相當(dāng)于 git clone 獲取 git remote update ; git rebase origin/branch
選項(xiàng):
* -c: 只從服務(wù)器端獲取當(dāng)前分支
* -d: 分離頭指針狀態(tài),切換到指定提交,丟棄工作區(qū)修改
* -f: 即使某個(gè)項(xiàng)目失敗,也同步其他的
* -n: 只網(wǎng)絡(luò)操作 git fetch
* -l: 只本地操作 git checkout
* -j : 并發(fā)數(shù) -
repo download [options] <change_number>/<patch_id>
默認(rèn)使用checkout檢出
選項(xiàng):
-c: 使用cherry-pick 命令檢出
-r: 撤銷評(píng)審的提交 -
repo forall [project-list] -c command
選項(xiàng) :
-c: 要運(yùn)行的命令和參數(shù)
-e: 一個(gè)命令失敗,全部失敗
-p: 在輸出結(jié)果之前顯示項(xiàng)目標(biāo)頭
-r : 正則匹配到的項(xiàng)目執(zhí)行
-i : 正則沒有匹配到的項(xiàng)目執(zhí)行例子: repo forall -pc git rest --hard; git clean -fdx