Tom
Tom

Reputation: 5052

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

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.

  1. Start Rstudio and create a version-controlled project (I'm using GIT)
  2. Realize that you put the project in the wrong folder of your computer
  3. 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).

Upvotes: 18

Views: 13524

Answers (2)

ksrm
ksrm

Reputation: 11

If you use GitHub Desktop, it will detect that the project has been moved and allow you to locate (set) it to a different folder.

Upvotes: 1

Eric Krantz
Eric Krantz

Reputation: 2199

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.

Upvotes: 4

Related Questions