Now let's look at another improvement that we can bring to git
. Most tasks are easy to execute from the command line, but some tasks, such as merging, require a specialist's eye for understanding the different format.
Let's open the feature
file from our previous chapter, edit it, add a new line, and save it:
git diff
The git diff
command will show us colored text explaining the differences between the git
file and the modified file, but some people find this format hard to understand:
Luckily, we can tell git
to use external tools when it comes to merge and one external tool that we can use is called Meld. Let's install it using the following:
sudo apt install meld
After this, we can run the following command:
git difftool
It will ask us if we want to launch Meld as an external program for viewing the file. It's also giving us a list of tools that it can use for displaying the difference. Hit y
to open Meld:
Now we can easily see the two files side by side and...