kynan/nbstripout

nbstripout being installed causes git pull to fail

Open

#108 建立於 2019年11月1日

在 GitHub 查看
 (15 留言) (1 反應) (0 負責人)Python (1,047 star) (90 fork)batch import
help wantedstate:needs follow uptype:enhancement

描述

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.

sirfuser@sirf-gpu-0:~/devel/SIRF-Exercises$ git status
On branch master
Your branch is behind 'origin/master' by 4 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   notebooks/PET/MAPEM.ipynb

no changes added to commit (use "git add" and/or "git commit -a")
sirfuser@sirf-gpu-0:~/devel/SIRF-Exercises$ git diff
sirfuser@sirf-gpu-0:~/devel/SIRF-Exercises$ git pull
Updating 7e101a9..8fedddf
error: Your local changes to the following files would be overwritten by merge:
        notebooks/PET/MAPEM.ipynb
Please commit your changes or stash them before you merge.
Aborting

In this scenario git stash before the git pull sometimes works, although a git 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 https://github.com/kynan/nbstripout/issues/65

貢獻者指南