gpt4 book ai didi

git - check out 标签时如何减少 git 输出

转载 作者:行者123 更新时间:2023-12-01 13:54:01 25 4
gpt4 key购买 nike

当我检查一个标签时,我得到这个输出:

λ git checkout REL-6.2.0
Note: checking out 'REL-6.2.0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

git checkout -b <new-branch-name>

HEAD is now at c154795... Set REL-6.2.0 in pom.xml on release/6.2.0 branch.

有没有办法让输出少一点或者不用 git checkout -b 提议?我知道我可以使用像 >/dev/null 这样的东西,但我想要一些输出,但只是更少

最佳答案

来自documentation对于 git checkout,您可以使用 --quiet 标志来抑制某些类型的输出:

git checkout --quiet    # or just -q

我刚刚使用 --quiet 标志在分离头状态下检查了本地分支上的先前提交,但 Git 的控制台中没有输出。相反,我只是看到了新的提示:

/c/users/timbiegeleisen/documents/project ((9e51b34...))

关于git - check out 标签时如何减少 git 输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46524192/

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