I have a project called edav.info/, which is published using bookdown. A lot of students have helped contribute to the resource using github pull requests. After a while, I noticed the github folder had gotten very large (~700MB) even though all our resource files are not much bigger than 70MB. I found that our
.git folder was the culprit, keeping track of the history of the project for us.
I think the large
.git size is a result of running the
bookdown::render_book command over and over, which generates a lot of new files each time it is called. I'm wondering about two things:
1. How can I reduce the size of our repo (remove the temporary render files from history)?
2. Can I prevent the
.git folder from clogging up in the future?
Currently all of the bookdown files and the
_book folder it generates are all included in the
.gitignore, but I'm not sure if that's enough. I'd be interested in hearing from anyone who has a similar resource created using bookdown in how you have gotten around the large
.git folder problem.
Here's a link to the repo and the resource: