I recently posted on twitter asking for advice on version controlling jupyter notebooks. I’m working collaboratively on a jupyter notebook to be used in an Oceanography Camp for Girls in a few weeks and resolving conflicts was a nightmare with all of that extra “stuff” jupyter notebooks save under the hood (json?). @rabernat saved the day with a recommendation for Jupytext, which works really well so far! Essentially, it links link your .ipynb file to a plain .py file and git tracks that instead of the .ipynb file. Jupytext then knows how to turn your .py file back into a notebook each time you open it.
However, I had a few challenges getting it set up to work on Binder. The disconnect for me was that not only do you have to add jupytext to the dependencies in the environment file, but you also have to add a postBuild script to install jupytext when the Binder is building. The answer is not that well detailed in the installation instructions and I’m a newbie so I struggled to figure it out. There is a section in the Jupytext FAQ about Binder it but I hope this is helpful for others who might be looking to get Jupytext set up.