Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git: keep only the latest version of a specific file

I keep some LaTex course notes in github. My colleagues don't know how to use LaTex, and asked me to put the final PDF in the repo.

Keeping binary build results in a repo is generally a bad idea, and uploading the PDF as an extenal file after each push isn't convenient.

Is there a way to keep only the latest version of the PDF in the repo?

like image 464
Adam Matan Avatar asked Aug 30 '12 06:08

Adam Matan


1 Answers

If you're already on github, there's a panel called "Downloads" where you can add whichever file you have. There's probably an API-call for that if you want to add it to a hook for when you're pushing. You could also probably just build + copy the pdf to your dropbox account/rsync it to a common folder/use another share-my-files-API/..

You might be better off to generate the pdf + email it to them, also triggered by a hook.

If you do end up building, adding the pdf to the repo and then updating that file a lot, the repo will grow really big since the diffs it will have to hold on to will take a lot of unnecessary space.

like image 170
chelmertz Avatar answered Oct 06 '22 23:10

chelmertz