在ConEMU中显示git分支 [英] Showing git branch in ConEMU
问题描述
是否可以在ConEmu中以可视化方式(背景或类似)在git中显示分支?
Is there a way to show the branch in git somewhere visually (background or similiar) in ConEmu?
推荐答案
免责声明#1
Disclaimer #1
ConEmu不是外壳程序,因此它不提供外壳程序功能",例如制表符完成,命令历史记录等.
ConEmu is not a shell, so it does not provide "shell features" like tab-completion, command history and others.
通常,Git信息(例如分支或更改量)会显示在命令行提示符下,例如C:\path\to\repository [branch|+2~4-6]>
.这是由执行程序外壳而不是控制台框架完成的.
Usually, Git information like branch or amount of changes is displayed in the command line prompt, for example C:\path\to\repository [branch|+2~4-6]>
. This is done by the executing shell, not the console frame.
据我所知,标准Windows命令提示符(CMD)不支持对其进行修改.不过, Git for Windows 附带的bash已经很好地支持了这一点.对于PowerShell,Git有许多扩展,最值得注意的是 posh-git .
As far as I know, the standard Windows command prompt (CMD) does not support modifying that. The bash that comes with Git for Windows already supports that perfectly though; and for PowerShell there are numerous extensions for Git, most notably posh-git.
这篇关于在ConEMU中显示git分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!