有没有办法让git flow显示它在幕后执行的命令?

Ale*_*lex 6 git git-flow

有没有办法让git-flow提前告诉我在执行flow命令时它将执行的确切git命令; 还是告诉我,因为它是洞呢?

我只能看到输出和摘要?

Dan*_*ruz 11

您可以使用Git的GIT_TRACE 环境变量来获取执行的命令的详细跟踪.例如:

GIT_TRACE=true git flow feature start bar
Run Code Online (Sandbox Code Playgroud)

...显示......

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
Run Code Online (Sandbox Code Playgroud)

如果您想了解更多详细信息,可以使用shshell xtrace选项:

扩展每个简单命令后,对于command,case命令,select命令或arithmetic for command,显示PS4的扩展值,然后显示命令及其扩展参数或关联的单词列表.

编辑git-flow脚本并set -x#!/bin/sh第一行后添加.执行上述命令git flow feature start bar会显示很多信息(超过可以包含在答案中).


sap*_*ish 5

使用--showcommands开关,例如:

git flow feature start FEATURENAME --showcommands
Run Code Online (Sandbox Code Playgroud)