美文网首页
repo 使用小结

repo 使用小结

作者: 王小宝wy | 来源:发表于2016-12-23 11:30 被阅读0次

切分支

repo start <branch-name> <module-name>

比如:

repo start develop art/runtime

这条命令相当于给art/runtime这个模块执行git checkout -b develop

执行shell命令

repo forall <module-name> -c  <shell-command>

比较常见的使用情形是执行git命令(在源码根目录下):

repo forall packages/app/Contacts -c git status

repo forall packages/app/Contacts -c git add -A

...

查看git状态

repo forall packages/app/Contacts -c git status

用这种方式可以查看一个模块的git状态,命令的输出是标准的git输出格式:

On branch develop
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   runtime/native/dalvik_system_DexFile.cc
    modified:   runtime/native/java_lang_Class.cc

no changes added to commit (use "git add" and/or "git commit -a")

repo本身也提供一种更简洁的查看状态的命令:

repo status art/runtime

这种方式的输出也更加简洁直观:

project art/                                    branch develop
 -m     runtime/native/dalvik_system_DexFile.cc
 -m     runtime/native/java_lang_Class.cc

-m就相当于modified,同时还输出了当前代码所在分支

相关文章

  • repo 使用小结

    切分支 比如: 这条命令相当于给art/runtime这个模块执行git checkout -b develop ...

  • repo 使用

    当依赖库多的时候,使用 repo 好比散兵有了将军 ,用处非常大 . 为方便理解,对应 git 来阐述 repo...

  • repo使用

    一.使用git命令 1.回滚整个项目到当前最新版本 repo forall -c git reset --hard...

  • Repo使用

    Repo 是一款工具,可让您在 Android 环境中更轻松地使用 Git。 安装Repo 要安装 Repo,请执...

  • Git & Repo 最基本命令 菜鸟教程

    前言:发现新来小伙伴,对git以及repo命令还不是特别熟悉,因此对git及repo最基本命令做了一下小结: **...

  • Maven导入本地包

    使用scope 使用本地repo

  • 使用CocoaPods创建私有Spec Repo管理项目公共组件

    使用CocoaPods创建私有Spec Repo管理项目公共组件 使用CocoaPods创建私有Spec Repo...

  • repo/gerrit总结

    楔子 新接手一个项目,要用到repo和gerrit,总结下repo使用过程。 repo/gerrit概述 repo...

  • Repo 使用详解

    Repo 是一款工具,可让您在 Android 环境中更轻松地使用 Git。 安装GIT 省略 安装Repo 要安...

  • AOSP编译真机镜像

    源码准备 准备repo工具 Repo使用: http://source.android.com/source/us...

网友评论

      本文标题:repo 使用小结

      本文链接:https://www.haomeiwen.com/subject/uelkvttx.html