如何列出Goolge Repo工具的所有选项?

时间:2018-08-01 16:58:59

标签: git repo

为什么repo工具没有列出所有可能的选项? 例如,manifest或其子选项-ohere使用的-r在输出中不显示:

$ repo
usage: repo COMMAND [ARGS]
The most commonly used repo commands are:
  abandon        Permanently abandon a development branch
  branch         View current topic branches
  branches       View current topic branches
  checkout       Checkout a branch for development
  cherry-pick    Cherry-pick a change.
  diff           Show changes between commit and working tree
  diffmanifests  Manifest diff utility
  download       Download and checkout a change
  grep           Print lines matching a pattern
  info           Get info on the manifest branch, current branch or unmerged branches
  init           Initialize repo in the current directory
  list           List projects and their associated directories
  overview       Display overview of unmerged project branches
  prune          Prune (delete) already merged topics
  rebase         Rebase local branches on upstream branch
  smartsync      Update working tree to the latest known good revision
  stage          Stage file(s) for commit
  start          Start a new branch for development
  status         Show the working tree status
  sync           Update working tree to the latest revision
  upload         Upload changes for code review
See 'repo help <command>' for more information on a specific command.
See 'repo help --all' for a complete list of recognized commands.

enter code here$ repo -h

Usage: repo [-p|--paginate|--no-pager] COMMAND [ARGS]

Options:
  -h, --help      show this help message and exit
  -p, --paginate  display command output in the pager
  --no-pager      disable the pager
  --color=COLOR   control color usage: auto, always, never
  --trace         trace git command execution
  --time          time repo command execution
  --version       display this version of repo

1 个答案:

答案 0 :(得分:1)

有关已识别命令的完整列表:

$ repo help --all

有关特定命令的更多信息:

$ repo help <commands>

例如清单命令:

$ repo help manifest

Summary
-------
Manifest inspection utility

Usage: repo manifest [-o {-|NAME.xml} [-r]]

Options:
  -h, --help            show this help message and exit
  -r, --revision-as-HEAD
                        Save revisions as current HEAD
  --suppress-upstream-revision
                        If in -r mode, do not write the upstream field.  Only
                        of use if the branch names for a sha1 manifest are
                        sensitive.
  -o -|NAME.xml, --output-file=-|NAME.xml
                        File to save the manifest to
[...]