I'm using nbdime
to diff and merge Jupyter notebooks, and aside from being a tad slow for large notebooks, I love it. However, when I try to do version control from within PyCharm, my git settings for this seem to be ignored and it does a textual diff of the .ipynb
files.
My .gitconfig
has the following, which I believe were set up when I installed nbdime
:
[diff "jupyternotebook"]
command = git-nbdiffdriver diff
[merge "jupyternotebook"]
driver = git-nbmergedriver merge %O %A %B %L %P
name = jupyter notebook merge driver
[difftool "nbdime"]
cmd = git-nbdifftool diff \"$LOCAL\" \"$REMOTE\"
[difftool]
prompt = false
[mergetool "nbdime"]
cmd = git-nbmergetool merge \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"
[mergetool]
prompt = false
From the command line, this works great. (Well, I've never had to do a merge, but the diff works great.)
Also, I see that you can specify an external diff tool in PyCharm, but that appears to be a global setting.
Has anyone gotten this to work?