天天看点

repo 常用命令等

repo

通过 TAG 回退项目

  • 通过 TAG 可以回退整个项目的所有工程到某天的时间点。

    (1)SCM在每天编译版本,都会打上 TAG, 位于:

项目/.repo/manifest/tag目录/具体某天.xml

(2)在项目目录下指向对应的 TAG:

repo init -u ssh://xxx.xxx.xxx.xxx:xxx/XXX/manifest -m tag目录/具体某天.xml

(3)更新代码:

repo forall -c git reset –hard && repo forall -c git clean -fd && repo sync -cj24

git

stash

git stash save “modify bug_1” 将目前的修改保存起来

git stash list 查看通过上述命令都保存了哪些

git stash apply stash@{1} 恢复后并没有删除stash列表中的,可以通过 git stash drop stash@{0} 来删除

git stash pop stash@{0} 恢复的同时也删除了stash中的

继续阅读