How to view differences of branches with meld?

By | December 17, 2014

git-meld is a git command that allows you to compare and edit treeishs between revisions using meld or any other diff tool that supports directory comparison. git meld is a frontend to git diff and accepts the same options and arguments.

It is essentially an extended git-difftool for tools that support comparing directories rather than having git call the external tool for every file that has changed.

Installation

  1. Install git-meld to GIT_MELD_PATH. e.g., git clone https://github.com/wmanley/git-meld

  2. Rename git-meld.pl to git-meld and change it excutable

  3. Add GIT_MELD_PATH to $PATH

  4. Add a git alias to gitconfig with:

git config --global alias.meld '!GIT_MELD_PATH/git-meld.pl'

Alternatively add:

[alias]
meld = !/path/to/git-meld/git-meld.pl

to ~/.gitconfig

Example

Show all the changes between two commits

git meld commit_hash1...commit_hash2

Leave a Reply

Your email address will not be published. Required fields are marked *