将 Git 分支添加到命令提示符

Adding Git branch to Command Prompt

当在 ITerm(mac) 中寻找一个很酷的功能的替代品时,它显示了我们所在的分支:

found out那个:

If you are on Windows, you probably aren't reading this because Windows provides this behavior by default.

我不知道默认情况下它在这里。怎么做?

如果您通过他们的控制台 (Git Bash) 使用 git,它默认存在,您无需执行任何操作即可访问它。

如果您还没有,请下载 Git Bash - 这就是我在上图中使用的内容。

您可以使用 Cmder 作为 windows 的控制台模拟器:http://cmder.net/