有没有办法让git-flow在执行flow命令之前提前告诉我它将要执行的确切git命令;或者在执行时告诉我?
我只能看到输出和摘要吗?
我只能看到输出和摘要吗?
GIT_TRACE
环境变量来获取执行命令的详细跟踪信息。例如: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 的 xtrace
选项:git-flow
脚本,并在第一行的 #!/bin/sh
后面添加 set -x
。执行上述命令 git flow feature start bar
,将显示大量信息(超出了答案中所包含的范围)。--showcommands
开关,例如:git flow feature start FEATURENAME --showcommands