Search code examples
gitmeld

How to open git diff of two files from different branch by Meld?


As I have found in the question: https://stackoverflow.com/a/4099805/5962966/

I can compare the files between two git branches by the following command, but How do I open the diff window in Meld and save the changes as well?

git diff mybranch master -- myfile.cs

Already tried but not working: https://stackoverflow.com/a/34119867/5962966


Solution

  • Replace diff with difftool

    git difftool mybranch master -- myfile.cs

    If you only have meld installed git should use it as the default difftool. Regardless it should also give a prompt showing which tools are compatible and how to set the tool you wish to use.