0

This is hard to format in the ideal manner that StackOverflow most appreciates:

I would like to use iPython Notebook along with a Git / GitHub repository. This is challenging due to the constant merge file clashes due to "nonsense" file changes. Is there some way to overcome that?

Specifically, I may run someone else's code, but re-run lines that they didn't, or vice-versa. Therefore, my [In: ] and [Out: ] numbers will not match up, and every time I try to submit changes to a file, "false" same-line clashes will occur all the time.

I'm trying to get my organization to adopt reproducible reporting, but this hinders progress. Is there some way to turn off the checking for certain lines within Git? E.g., can I tell it to ignore any lines where the only difference is the number following [In: ] and [Out: ]?

Mike Williamson
  • 4,915
  • 14
  • 67
  • 104
  • How about restarting the kernel so that there are no [In: ] and [Out: ] numbers and only allow commits where the kernel has been restarted? – nluigi Sep 15 '15 at 08:40
  • Thanks, @nluigi That is an option, although not very robust. I'd meant to implement this across a team, and telling everyone "just do this one specific way of submitting", is not nearly as ideal as being able to, say, ideally create a config file like a .gitignore or something. – Mike Williamson Sep 15 '15 at 20:26
  • 1
    I agree that its not very robust. Have you seen [this](http://stackoverflow.com/questions/18734739/using-ipython-notebooks-under-version-control) question and its answers? – nluigi Sep 15 '15 at 21:33
  • No, @nluigi, I had not. (I had first done a search, not a very effective one, I guess.) Thank you! – Mike Williamson Sep 22 '15 at 22:00

0 Answers0