mcdiff
In addition to the well-known mcedit editor, Midnight Commander has at least a great utility for comparing files side by side (side-by-side) - mcdiff. It can be compared and, if necessary, to produce a full or partial merger in both directions.

The history of the emergence of the utility mcdif was once told
here but more to the point ...
')
Connect mcdiff to git
In order to use mcdiff with git you need to write a script wrapper
diff_wrapper with the following contents
then save it. for example, in the ~ / bin / directory (or in any convenient place for you) without forgetting to give the execution rights
chmod +x ~/bin/diff_wrapper
Next, you need to configure the wrapper call when executing the
git diff command in the
.gitconfig file.
my .gitconfig file contains the following lines
[diff] external = /home/holmes/bin/diff_wrapper [pager] diff =
- The external key indicates which external utility data will be transferred.
- The diff key in the pager section indicates which page by page viewer will scroll through the contents of the output, but because the utility mcdiff takes over all control, the diff key must be zeroed, if this is not done - you can get a bunch of side effects.
Also, by adding the
-w option, you can disable the display of differences in whitespace characters.
git diff -w
however, mcdiff can take care of this itself, just press F9 and select the desired option. In addition, other comparison options are available:
[x] Ignore case
[x] Ignore tabs
[x] Ignore changes in spaces
[x] Ignore all spaces
[x] Disregard line breaks
In addition, if you need to refuse to run the external comparison utility, you must add the key -
no-ext-diff :
git diff --no-ext-diff
And of course, what I use all the time is the function of partial merging of files, the F5 key in mcdiff.
NB: It should be noted that the external comparison utility will be launched for each file changed in a commit, this is not always convenient, but there is nothing to be done, especially if there are a lot of files.
More information can be found on the official
git manual page.PS: Let me know if you find typos in the text or want to add something to this note ...