Ubuntu - Configure Git to Use Meld for Diffs
By default, git will show you diffs in the CLI in a single view, rather than split view. I'm not elite enough to be able to work this way. This tutorial will show you how to configure git to make use of meld to have a split-pane view of your changes.
Steps
Install Meld
Install meld if you haven't already got it. Ubuntu/Debian users can simply run:
Dixon Dick from the comments pointed out that Mac users can use homebrew to install meld from a tap:
Configure Git
After having installed meld, run the following command to configure git to make use of meld.
Alternatively, copy,paste, and execute the following bash script to do the same thing.
Now when you want to view changes you have made to any files you can run:
or if you just want to view changes in one file:
Using Meld For Merge Conflicts
You probably want to also use meld for resolving merge conflicts. You can set it to do so with:
References
- How to: Meld for Git diffs in Ubuntu Hardy
- Setting up and using Meld as your git difftool and mergetool
First published: 16th August 2018