I'm trying to use gvimdiff as a mergetool for git on Windows. Previously I've used vimdiff in console mode, but know feel like I'm not happy with limiting view Windows console size, so I'm trying to switch to gvimdiff which have more flexible approach to setting window size.
But trying to call git mergetool
now I'm receiving error which is not clear for me:
The merge tool gvimdiff is not available as 'gvim'
How this could be resolved?
gvim
for Windows is install and accessible via command line. The same is true for gvimdiff
command.
I'm trying to find the place where this error is raised in git scripts, but currently with no luck.
git mergetool is fully configurable so you can pretty much chose your favourite tool. In brief, you can set a default mergetool by setting the user config variable merge. tool . If the merge tool is one of the ones supported natively by it you just have to set mergetool.
We can manually resolve the merge conflict by editing the content in the bottom pane, and then saving the file using :wqa (Write and Quit all files). Once the conflict resolution is successful, the merged file will be staged for commit. git commit -m 'Merged from multiple branches' .
Combining your answers, these are my settings
.gitconfig
[alias]
d = difftool
[diff]
renames = copy
tool = gvimdiff
[difftool "gvimdiff"]
cmd = "gvim -d" "$LOCAL" "$REMOTE"
[difftool]
prompt = false
And added file gvim
accessible in %PATH%
with content:
"C:\Program Files (x86)\Vim\vim73\gvim.exe" "$@"
Git difftool in Windows to see list of all changed files in addition to file diffs (a la Kaleidoscope)?
If you start a Git console, are you sure the commands are accessible? I'm suspecting that it is not on the PATH
of your Git console, only the Windows PATH
(which is not entirely included).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With