To avoid generating unwanted git
.backup files, you can modify the configuration by executing the following command:
git config --global mergetool.keepBackup false
Typically, when using
git mergetool to resolve merge conflicts, the tool will save the conflicted version of the file with a .orig and .backup suffixes. However, if the
mergetool.keepBackup configuration option is set to
false, these .orig and .backup files will not be preserved. It’s worth noting that the default value for this option is
true, meaning that backup files will be kept by default.