3 followers Follow

Using RStudio projects AND Git with multiple users

I read this article: which describes how RStudio projects can be configured to share with multiple users. I have two questions about this:

1) Does this mean there will be no issues with saving code files if two users are working on the code files at the same time? Or does it only mean that multiple users can access the project files (but not at the same time)?

2) What if the project also has a local Git repository? Will two users working on the project at the same time be able to commit to the repository at the same time as well? 

I know that usually there would be a remote repository and users would clone the repository to their own machines and have separate .Rproj files, but I am wondering about a situation where a remote repository is not possible, and several users can access an RStudio project on a shared network drive (maybe, but not always, at the same time).

Thank you! 

Kathleen McLean

Official comment


Hi Kathleen,

1) Under this configuration it is possible for two users to have the project open at the same time. However, it is not advisable for them both to be working on the same code file at the same time, because every time a user saves the file, the other users will see a prompt indicating that the file has been changed externally. This is likely to be annoying. :-)

2) Yes, but to do this you need to be careful about the permissions. Sharing a git repo among multiple users can cause problems because the files in the .git folder wind up with a mix of owners. Here's a post with more detail:

Although it's possible to have users share the local copy of the repo, it is not preferable. It is likely that you can set up a remote repository no matter your constraints; in fact, git can work with a "remote repository" that's nothing more than a folder on a shared network drive. See this article for details:

Finally, you might be interested to know that our just-released version of RStudio Server Pro includes project sharing features that take care of file permissions for you and offer collaborative editing (so you can in fact have two or more people actively editing the same file). More on that feature here:

Hope this helps!



Jonathan McPherson