When developing packages in RStudio.
By default RStudio assume your package directory is the project directory and it looks like that:
But you are allowed to point the package location to a subdirectory of the project directory and it looks like that:
This way you can have some part of your project files, kept in the root project directory, not included in the package. You don't need to set git ignore etc.
But if you want to add RStudio git repo features, you are not allowed to point your git repo in subdirectory, even if you have already created git repo in your package dir (not project dir) you cannot set it in RStudio. I'm stuck at:
Is there any way to enable git repo features in RStudio having git repository in the subdirectory of the RStudio project? Maybe some .Rproj config tweaks?
The RStudio project file is a file that sits in the root directory, with the extension . Rproj. When your RStudio session is running through the project file (. Rproj), the current working directory points to the root folder where that .
Very good question. I've experienced the same trouble and it also does not go away with the latest pre-test release. So there's likely no super quick solution to this inside rstudio
. Though it might be worth a feature request.
Personally I use the console / git bash with git and rstudio
. That is I create a project inside R studio and manually run git init
outside rstudio
. Also I add, commit, merge, push and pull outside rstudio
. If you don't like to manage git via console there's https://windows.github.com/ and https://mac.github.com/ also the folks at Atlassian provide some GUI tool called source tree: https://www.atlassian.com/software/sourcetree/overview
Plus there are many others, like Tortoise Git which I haven't tested, but I think R Studio's current git support is fine for simple things, but a git tool (console or gui) is definitely the way to go if you want to be more flexible.
That being said, sublime
text edit is a powerful and easy to hack and customizable text editor which also has quite some packages to extend it. It's not entirely free but sometimes it's a nice supplement to rstudio
. And it has a cool resolve conflict package etc.
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