I want to sync my GitHub repo, which contains Python code, data, and LaTeX source files into Overleaf. The Overleaf GitHub integration works very well until you have a single file in your GitHub repo that exceeds 50MB. If you do have such a large file, you can't sync your GitHub repo in Overleaf. I cannot delete these large files since I need to use them for the data analysis. However, at the same time, I want to have the code, data, and LaTeX files in the same repo for seamless integration between Python and LaTeX. This allows me to programmatically update figures, tables, and variables in LaTeX.
How to solve this problem?
I found a workaround, as follows:
Create a branch called
manuscript
Add .gitignore in that branch, to only include .tex files
Sync this branch with a new GitHub project by adding a new remote called
paper
Import this new GitHub repo into Overleaf
The issue is that every time I want to update the newly created repo, I need to run the following command
git checkout manuscript
git merge master
git push paper
git checkout master
Then once I make some changes to the Overleaf project via their online editor I need to do:
git checkout manuscript
git pull paper manuscript
git checkout master
Finally, in need to cherry-pick the changes to the LaTeX file. A git merge
manuscript into master will delete all the big files.
As you can see this process is very cumbersome and not user-friendly. Any suggestions to improve my workflow?