Windows 上的 RStudio 未检测到 Git 安装

RStudio on Windows doesn't detect Git installation

我已按照“Version Control with Git and SNV”的说明进行操作,但我无法在项目设置中 select git 对我的项目进行版本控制。

我在:

我已经从 https://git-scm.com/downloads.
为 Windows 安装了 git 2.9.0 它安装在 C:\Users\spi\AppData\Local\Programs\Git 下(我们称之为 gitroot

在 RStudio 和 PATH 中,我尝试(一次一个,每次 closing/reopening RStudio)指定

的所有可能组合

PATH - RStudio global settings

如下:

欢迎任何提示。

提前致谢!

解决方案是在 C:\opt\Git 中为 Windows 安装 Git,这看起来不是 special 文件夹。

我只能在中止重新安装后才能选择安装位置。

对我有用的是将路径文件从 git-bash 更改为 gitcmd:

正确路径文件:

C:\Program Files\Git\cmd