This is useful in particular for repositories which explains some concepts on bunch of markdown files, in order to decrease back, forth navigation. A single PDF file can be generated through following steps:
$ for file in $(find . -name "*.md" | sort); do echo -e "\n\n# $(basename "$file" .md)\n\n" >> combined.md; cat "$file" >> combined.md; done
$ pandoc combined.md -o Grokking_System_Design.pdf
(retrieved: https://stackoverflow.com/questions/2100907/how-can-i-remove-delete-a-large-file-from-the-commit-history-in-the-git-reposito )
Any files over 100 MB in size (that aren't in your latest commit) will be removed from your Git repository's history. You can then use git gc to clean away the dead data:
git reflog expire --expire=now --all && git gc --prune=now --aggressive