RStudio doesn't recognize project git repos when project is on a separate network drive

I do most of my R coding on a secure server that I remote into. My projects and packages used to be stored on this server, but are now stored on a separate network drive that the remote server can access. I can open projects, load data, run code, etc. over the network without a problem, and these projects and packages are all version-controlled with git (I set them up that way when they were stored on the local drive, before they were later moved to the separate network drive).

Here's my problem: When I open RStudio projects/packages stored on the network drive, the git menu doesn't appear. When I select Tools-->Version Control-->Project Setup, the "Version Control System" is set to "(None)". If I select "Git" from the dropdown, RStudio asks if I want to initialize a new repository for the project (even though a repository already exists in the project folder). If I select "Yes" I get an "Incorrect Function" error.

Is there some way I can get RStudio to recognize and use the existing git repo as it normally would on a local drive?

In case it might be important to know:

  • From the server I remote into, the network drive project folders look like this: "//securefiles/department/Joel/projects/myanalysis" (which is how RStudio "sees" the network), but the network drive is also mapped to a logical drive like "Z:/department/Joel/projects/myanalysis" on the server.
  • The server is running R 4.0.4 and RStudio 1.4.1106
  • The Server operating system is MS Windows Server 2016 Standard

I posted this on Stackoverflow after not getting any responses here. In case anyone else is having a similar problem, I'm linking to the Stackoverflow post, since it includes some useful suggestions for making progress on this issue.

1 Like