gpt4 book ai didi

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

转载 作者:太空狗 更新时间:2023-10-29 13:05:42 28 4
gpt4 key购买 nike

有没有办法让 git-flow 提前告诉我当我执行 flow 命令时它将执行的确切 git 命令?或者告诉我它是什么东西?

我只能看到输出和摘要吗?

最佳答案

您可以使用 Git 的 GIT_TRACE environment variable获取已执行命令的详细跟踪。例如:

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 选项:

After expanding each simple command, for command, case command, select command, or arithmetic for command, display the expanded value of PS4, followed by the command and its expanded arguments or associated word list.

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

关于git - 有没有办法让 git flow 显示它在幕后执行的命令?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15440291/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com