Enabling version control in RStudio > Git was not detected on the system path

While following these RStudio guidelines I'm unable to integrate RStudio with my locally installed git client.

As you can see in the screenshot below, RStudio is changing the full path into a relative path (which I cannot override, although I'm not sure if that would solve the issue)

But nevertheless, whenever I want to enable git versioning for a specific project, the following error occurs:

Git was not detected on the system path

Even following this advice on SO didn't solve my issue (Or do I need to restart my laptop after this modification??).

image

My system setup is:

  • Windows 7 64-bit
  • RStudio version Version 1.0.153
  • git version 2.8.2.windows.1

Thanks for any advice!

Have you added the git location to your PATH variable (displayed in the Environment Variables dialogue you show above)? It might be that RStudio is looking in there to try and find git?

Hi Jim,

First of all it's my bad that I added the filepath to the System variables with variable Git .. that obviously won't work. After further investigation I found out the following: the PATH setting in my User variable is set correctly. I opened cmd.exe, entered the command PATH and the reference is returned correctly.

However, I get different results when doing something similar but now from the RStudio menu Tools > Shell. The cmd opens in the current project directory path and when the PATH is entered I see multiple references to the Git executable:

  • C:\Users\user\Documents\Tooling\Git\bin\
  • ~/Tooling/Git/bin

I also doublechecked the Default working directory in my Global Options > General. It shows ~ and browsing to it brings me indeed to the same location from which the 2nd reference should work just nicely.

So in short: I'm still puzzled why RStudio is giving me this system path error.

I have the same issue. I opened a ticket here in april to rstudio support

Problem is with the integration of git in rstudio IDE when git is installed somewhere under My documents folder on windows.
If you install in the user's directory, parent from my documents, it works.

I think problem is with the path which not is not expanded correctly.