Set git default diff- and mergetool to pyCharm

I'd like to have pyCharm set as my default diff- and mergetool for git.

For instance if I type merge command in console and if conflict occurs pyCharm will be opened instead of that vi-style-looking default difftool.
Comment actions Permalink
PyCharm's diff tool can be invoked from the command line as 'pycharm diff <file1> <file2>', and the merge tool can be invoked as 'pycharm merge <file1> <file2> <origin>'.
Comment actions Permalink
It seems that the command is 'charm diff <file1> <file2>' rather 'pycharm diff <file1> <file2>' ( I am on Ubuntu )

However I am not sure what are these arguments 'file1', 'file2'?

I use git and I want to compare a file from current revision with the very same file from previous revision, but I don't know where the file from previous revision resides.

If it works in such a way that I have to type:
'charm diff <file_from_current_revision> <file_form_previous_revision>'
then it is pretty unhandy...

Is there any way to set that command to always work in following way:
charm diff fileX
to launch PyCharm diff tool on fileX from current revision and fileX from previous revision?
Comment actions Permalink
This is really a Git question, not a PyCharm question. PyCharm's standalone diff tool has no integration with any version control system and has no concept of "file X from previous revision".
Comment actions Permalink
Ah, well true, I expected PyCharm to do something it is not designed for.

Thanks for your answer.

Please sign in to leave a comment.