Hi there, I hope this is the right place to post this question.
I am trying to create a new website using Blogdown in RStudio. However I frequently face a problem of being unable to commit my changes. Specifically, I am unable to stage the changes in the 'Git' window of RStudio.
For example, I will select the check box next to the public/ folder, but nothing will happen. RStudio will then freeze up, as though it is trying to stage the folder, but nothing happens for 10-15 minutes, and then I have to terminate RStudio using Task Manager.
A screen shot is provided below. You will see that I can stage all the files, except for the public/, static/ and theme/ folders
To illustrate the problem, in this example I haven't even made any changes to the downloaded theme. I have run the following code, before trying to commit changes:
To make this more puzzling, I have been able to commit/push other projects to GitHub no problem, and have successfully deployed blogs using Netlify (these were based on the Lithium and Blackburn themes).
I will happily buy a beer, wine, or warm yak milk for anyone who has any ideas on what's going wrong here...
Can you try doing this process from the terminal? There is a pane with Terminal window right in RStudio if your version is current enough. Then you can try doing something like git add -a and all of the changes should be staged. I noticed that RStudio sometimes slows down whenever there are a lot of files in git window being staged, so maybe in your case there are too many of them or something.
Hi @SteveXD, I recently went through process of setting up Blogdown with GitHub integrating directly with RStudio. I ran into a VERY similar issue, with RStudio essentially crashing and having to terminate after a few minutes. This was relatively reproducible when I went to stage/commit the files.
My suggestion and how I got everything to work was switching away from full integration of Git and RStudio. I switched over to SourceTree at the recommendation of several R Users. Sourcetree is also Jenny Bryan's favorite as mentioned in Happy Git with R.
Sourcetree really improved my Blogdown workflow and I enjoy the UI a lot!
Thomas, thanks for you suggestion too. I actually independently arrived at this solution too - I downloaded GitHub client for windows, and was able to edit the website in RStudio and then successfully commit/push using the client.
I see in your link that Jenny Bryan explicitly advises against using GitHub client for Windows, so maybe I will use Sourcetree in future. Though I also found that the suggestion from mishabalyasin worked - using git add -A in the RStudio terminal instantly staged the files.
[Sorry, I still need to learnhow to tag people's profile names in RStudio community!]