Commiting to github from R Studio

129 views Asked by At

I am trying to create a website using the R package blogdown. Just have a little problem here. After these functions,

library(blogdown)
new_site()

I tried to commit the folders to Github (have a look)

enter image description here

I don't get anything after pressing "Commit". When I try to check the boxes, nothing happens. When I click "Stage", nothing. What's gone wrong?

2

There are 2 answers

1
dshkol On

The documentation for blogdown is pretty extensive. In particular, I suggest reviewing the quick example here.

You've generated the template for a new site with blogdown::new_site() but you haven't built it without running blogdown::build_site(). Then the public folder that is generated and populated is the thing that should be committed.

0
petzi On

Your problem has nothing to do with blogdown but it is a GIT issue. From your picture, it seems, that you did not select and check all the boxes for those files you want to stage. This is necessary to tell GIT which files it should include for your commit:

  1. Check those files you want to prepare for the commit. Only those files which are staged will be included in the commit. (This is the action you missed!)
  2. Add a commit message (this you have already done)
  3. Only now you can click the button "Commit" successfully.