有什么方法可以让 git-flow 提前告诉我当我执行 flow 命令时它将执行的确切 git 命令吗?或者告诉我它是东吗?
我只能看到输出和摘要吗?
你可以使用Git的GIT_TRACE
环境变量 http://git-scm.com/docs/git#_environment_variables获取执行命令的详细跟踪。例如:
GIT_TRACE=true git flow feature start bar
...显示...
trace: exec: 'git-flow' 'feature' 'start' 'bar'
trace: run_command: 'git-flow' 'feature' 'start' 'bar'
trace: built-in: git 'config' '--get' 'gitflow.branch.master'
trace: built-in: git 'branch' '--no-color'
trace: built-in: git 'config' '--get' 'gitflow.branch.develop'
trace: built-in: git 'branch' '--no-color'
trace: built-in: git 'config' '--get' 'gitflow.branch.master'
trace: built-in: git 'config' '--get' 'gitflow.branch.develop'
trace: built-in: git 'config' '--get' 'gitflow.branch.master'
trace: built-in: git 'config' '--get' 'gitflow.branch.develop'
trace: built-in: git 'config' '--get' 'gitflow.origin'
trace: built-in: git 'config' '--get' 'gitflow.prefix.feature'
trace: built-in: git 'branch' '--no-color'
trace: built-in: git 'branch' '-r' '--no-color'
trace: built-in: git 'branch' '--no-color'
trace: built-in: git 'branch' '-r' '--no-color'
trace: built-in: git 'checkout' '-b' 'feature/bar' 'develop'
Switched to a new branch 'feature/bar'
Summary of actions:
- A new branch 'feature/bar' was created, based on 'develop'
- You are now on branch 'feature/bar'
Now, start committing on your feature. When done, use:
git flow feature finish bar
如果您想要更多详细信息,您可以使用sh shell http://linux.die.net/man/1/sh xtrace
option:
展开每个简单命令、for 命令、case 命令、select 命令或算术 for 命令后,显示 PS4 的展开值,后跟该命令及其展开参数或关联的单词列表。
编辑git-flow
编写脚本并添加set -x
就在之后#!/bin/sh
第一行。执行上面的命令,git flow feature start bar
,会显示大量信息(超出答案中可以包含的信息)。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)