Is there a way to change the file path for an Rstudio project?

git, r, rstudio

Solution

With RStudio closed, I moved the project folder (using Windows Explorer) to a new location. My RStudio project opened fine from there. I made an edit and pushed it to Github.

If you use the `here` package on Cran you won't have to update any links.

Problem

I'm using GIT and I note that if I just move the whole folder (or rename it) in windows, that it breaks all the paths. I then end up in an infinite loop of trying to quit Rstudio and Rstudio unable to find the file path to save (or not save). Is there a way to move the location of the project folder while keeping it still intact? Sorry, let me make this clearer. - Start Rstudio and create a version-controlled project (I'm using GIT) - Realize that you put the project in the wrong folder of your computer - Move the project to the new folder by (a) moving the Rstudio and GIT files to another location using windows explorer. (breaking all the links) or (b) start a new project in the 'correct' location. (losing the versions of your edits).

Original source