-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nbstripout being installed causes git pull to fail #108
Comments
For very complicated cases I often tend to nbstripout --uninstall
git stash
git pull
git stash pop
<fix conflicts>
nbstripout --install |
presumably run |
no that would mean losing your local output. |
One thing we could consider is adding a dedicated I've had a look if we could automate this using Git hooks, however there's nothing like a "pre pull" hook. There are "post checkout" and "post merge hooks" though. We could potentially use those to ensure /cc @stas00 |
I also found some 3rd party documentation on merging notebooks when using |
@KrisThielemans @casperdcl any more thoughts on this? |
I'm happy following my proposed workflow as it seems transparent & simple to me. All of the steps between I can't think of a clean way for |
Sadly I have no time to investigate this further. Sorry. From what I recall, there actually are no conflicts (after applying the filter) in the use case given above. Maybe the behaviour is caused by conflicts before the filter, I don't know. Apologies that I can't be more helpful. |
Thanks both. I'll leave this on the backlog, in case someone comes along and wants to pick this up. |
For future reference: If the remote branch diverged from your local branch because someone pushed output cells without having nbstripout installed (e.g. a collaborator in a team doesn't have nbstripout installed and pushes), stashing or resetting local changes on a client with nbstripout won't be sufficient, because it is immediately overridden. You have to go all the way currently and run |
Thanks. As I've argued before I feel supporting this is a bit out of the league of |
probably worth documenting in the readme & closing this issue though |
I've mentioned this as a known issue. I'll leave this issue open to (hopefully) prevent too many duplicates being opened. |
Just a small note: if, for some reason, you have nbstripout filters in your global or system git configs, they should be cleared for this workaround to work. One of the possible checks: after "nbstripout --uninstall" run "git config -l | grep strip", the output should be empty. |
@a18 If there's anything you feel can be improved in the README, feel free to send a PR :) |
Despite
nbstripout
we still have failures with updating. Scenario: I run a notebook (without changing the actual content), and then want to pull in changes from github, but I cannot.In this scenario
git stash
before thegit pull
sometimes works, although agit stash apply
can either say there's nothing to change, or generate conflicts. I have the impression it actually gets rid of any output in the notebook, which is somewhat undesirable but seems unavoidable.This is somewhat related to #65
The text was updated successfully, but these errors were encountered: