You proposed Local (RStudio + Git + packages) setup... which is understandably fragile; vs. Cloud setup where everything is on RStudio Server that you host and is nearly guaranteed to work (what a relief, and I mean it). I have been using a compromise --
- Create a repo on GitHub/BitBucket;
- clone in the Cloud RStudio
- push everything back at the end of the session