我有一个这样的项目文件夹结构:Code/Repo/<repo_folder_name>/..subfolders
,在<repo_folder_name>
中,我有隐藏的.git
文件夹,因为我是从Sourcetree克隆到此文件夹的。
Eclipse确实显示了当前分支,但是当我在Visual Studio Code中打开此文件夹时,我知道它必须在左下角显示当前分支名称。
有人知道怎么做这个吗 ?要在Visual Studio Code中显示分支名称?
非常感谢你。
->我将Sourcetree的bin文件夹添加到PATH中,现在一切正常:D。 Sourcetree使用embed git,因此您必须将其添加到窗口路径
最佳答案
在docs中说:
Note: VS Code will leverage your machine's Git installation, so you need to install Git first before you get these features. Make sure you install at least version 2.0.0.
因此,您的系统上需要有一个Git才能使其正常运行。使用Sourcetree安装中的嵌入式Git可能会起作用,但可能不是最干净的解决方案。我在Sourcetree中安装的Git(在Mac上)大约3年(2.2.1)。在Mac上,尽管如此(2.11.0)也预装了一个Git,所以在这里它是开箱即用的。
关于visual-studio-code - 在Visual Studio Code中显示git分支,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44627008/