Windows 上的 RStudio 未检测到 Git 安装
RStudio on Windows doesn't detect Git installation
我已按照“Version Control with Git and SNV”的说明进行操作,但我无法在项目设置中 select git 对我的项目进行版本控制。
我在:
- 微软 Windows 7 Enterprise 6.1.7601 Service Pack 1 Build 7601
- RStudio:版本 0.99.902
- R: 版本 3.3.1 (2016-06-21) -- "Bug in Your Hair"
我已经从 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
如下:
gitroot\cmd
- gitroot\cmd\git.exe
gitroot
- gitroot\git-bash.exe
gitroot
- gitroot\git-cmd.exe
gitroot
- gitroot\mingw64\bin\git.exe
欢迎任何提示。
提前致谢!
解决方案是在 C:\opt\Git
中为 Windows 安装 Git,这看起来不是 special 文件夹。
我只能在中止重新安装后才能选择安装位置。
对我有用的是将路径文件从 git-bash 更改为 gitcmd:
正确路径文件:
C:\Program Files\Git\cmd
我已按照“Version Control with Git and SNV”的说明进行操作,但我无法在项目设置中 select git 对我的项目进行版本控制。
我在:
- 微软 Windows 7 Enterprise 6.1.7601 Service Pack 1 Build 7601
- RStudio:版本 0.99.902
- R: 版本 3.3.1 (2016-06-21) -- "Bug in Your Hair"
我已经从 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
如下:
gitroot\cmd
-gitroot\cmd\git.exe
gitroot
-gitroot\git-bash.exe
gitroot
-gitroot\git-cmd.exe
gitroot
-gitroot\mingw64\bin\git.exe
欢迎任何提示。
提前致谢!
解决方案是在 C:\opt\Git
中为 Windows 安装 Git,这看起来不是 special 文件夹。
我只能在中止重新安装后才能选择安装位置。
对我有用的是将路径文件从 git-bash 更改为 gitcmd:
正确路径文件:
C:\Program Files\Git\cmd