Meld is a great tool for files/directories comparison. Git on the other hand also provide diff command line tool, which some users may prefer too. I am going to show you how to use Meld as a git diff tool here.
Installation
Arch/Manjaro
sudo pacman -S meld
Ubuntu
sudo apt install meld
Setup and usage
Set Meld as a global git diff tool:
git config --global diff.tool meld
You can also set it up as a merge tool if you would like to be.
git config --global merge.tool meld
There are different ways to use it, one is to view files one by one by comparing two branches.
git difftool main..add-header-menu
Above method you may not find useful as viewing files one by one can be hazel.
Now let’s say you are on branch add-header-menu
, to compare this branch changes with main
branch using -d
(--dir-diff
).
git difftool -d main