Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有谁知道如何查看分支名称?即使是手动运行的工作流程?看不到任何明显的设置来改变它。
*** 编辑 ***
这是它在大多数存储库中的外观(分支名称为蓝色):
这是没有分支名称链接的异常回购:
要显示您所在的当前分支,而不列出其他分支,您可以执行以下操作:
git rev-parse --abbrev-ref HEAD
参考: 这里
或使用 Git 2.22 及更高版本:
git branch --show-current