Last Updated: January 14, 2021
·
2.352K
· lokiastari

Git diff

alias gd="git difftool --no-prompt --tool=<diff tool you want to use>"

I like 'vimdiff':

alias gd="git difftool --no-prompt --tool=vimdiff"

but supported tools are:

araxis, bc3, diffuse, emerge, ecmerge,
gvimdiff, kdiff3,kompare, meld, opendiff,
p4merge, tkdiff, vimdiff and xxdiff

All from the man page of "man git-difftool"

1 Response
Add your response

I have something similar to this, but I have it as a git alias (and vimdiff is the default difftool for me). Part of my .gitconfig:

[merge]
    tool = vimdiff    
[alias]
    vd = difftool --no-prompt

So I type git vd and it basically does the same. Of course your way is a lot shorter :)

over 1 year ago ·