.Rproj.user/
is causing spamming on each git commit e.g.
modified: .Rproj.user/CE897349/sources/prop/238F1188
modified: .Rproj.user/CE897349/sources/prop/3B42583E
modified: .Rproj.user/CE897349/sources/prop/6FD5F454
modified: .Rproj.user/CE897349/sources/prop/B1FA156F
modified: .Rproj.user/CE897349/sources/prop/CA32C405
modified: .Rproj.user/CE897349/sources/prop/INDEX
These 'changes' don't seem important, e.g.
{
"cursorPosition" : "19,0",
"scrollLine" : "12",
"tempName" : "Untitled3"
}
How did I get this directory in the first place, can I delete it (and preferably not have it return or appear in future projects)?
Note: the project is an R package.
As written on the official Rstudio page, the .Rproj.user
stores some «project-specific temporary files (e.g. auto-saved source documents, window-state, etc.)». In other words, this directory is created along any R Project you make.
These files contain information related to some project options, such as:
I have configured my ~/.gitconfig
file to have this directory always ignored when I start a local git repository. For how to do that, please look at this answer on StackOverflow. In other words: it's completely safe to have it ignored in your .gitignore
file.
As far as deleting the directory is concerned, I never tried it. I guess it will get rid of any custom setting for your projects, perhaps reverting to default ones.
I have the same problem with dropbox, and it seems that You can simply delete it. However You may lose your saved environment, but then You can just run everything from start again
.Rproj.user is a hidden directory where project-specific temporary files (e.g. auto-saved source documents, window-state, etc.) are stored.
If you delete it, you will not access to your history or these temporary files. Your project will still work - Rstudio will recreate the directory when you open the project.
https://support.rstudio.com/hc/en-us/articles/200526207-Using-RStudio-Projects
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With