如何在Bash提示中用颜色显示git分支?
在git存储库中工作时,我正在使用本指南在gnome终端(Ubuntu 15.10)中显示分支名称。基于以上内容,我现在在〜/ .bashrc文件中具有以下内容: # uncomment for a colored prompt, if the terminal has the capability; turned # off by default to not distract the user: the focus in a terminal window # should be on the output of commands, not on the prompt #force_color_prompt=yes ... # Add git branch if …