orome
orome

Reputation: 48606

Can I have my Git 'difftool' apply '--dir-diff' by default?

Is there a way to configure Git to always apply the --dir-diff option when executing

git difftool <commit> <commit>

For example, something logically equivalent to:

[diff]
    #tool = p4merge
    tool = araxis 

[difftool]
    prompt = false
    dirdiff = true # Is there something equivalent to this?

[mergetool "araxis"]
    path = /Applications/Araxis Merge.app/Contents/Utilities/compare

Upvotes: 13

Views: 2047

Answers (2)

Jacob Kenner
Jacob Kenner

Reputation: 1

Create a git alias: git config --global alias.gd 'difftool --dir-diff'

Now git gd will run the command you want with fewer characters.

Upvotes: 0

Serban Constantin
Serban Constantin

Reputation: 3576

Not natively, but you can create a shell alias (depending on what OS you're running) to do that for you, so you'd assign for example gd as git difftool --dir-diff

Upvotes: 9

Related Questions