git config --global --edit
should tell you the exact location git config --global --list
was also useful for when it doesn't exist as it gave the location of where git is expecting it to be git config --global diff.tool tkdiff
git config --global merge.tool tkdiff
git config --global --add difftool.prompt false
The first two lines will set the difftool and mergetool to tkdiff
- change that according to your preferences. The third line disables the annoying prompt so whenever you hit git difftool
it will automatically launch the difftool.
# For windows, bring up command prompt window to find directory where tkdiff.exe
# is located.
# This is Git's per-user configuration file.
[user]
# Please adapt and uncomment the following lines:
name = odacindy
email = cindy@rocknrollrobots25@gmail.com
[diff]
tool = tkdiff
[difftool "tkdiff"]
path = C:/Program Files (x86)/TkDiff/tkdiff.exe
[difftool]
prompt = false
[merge]
tool = tkdiff
[mergetool "tkdiff"]
path = C:/Program Files (x86)/TkDiff/tkdiff.exe
[mergetool]
prompt = false
# This is Git's per-user configuration file. .gitconfig
[user]
# Please adapt and uncomment the following lines:
name = odacindy
email = cindy@rocknrollrobots25@gmail.com
[diff]
tool = meld
[difftool "meld"]
path = C:/Program Files (x86)/Meld/meld/meld.exe
[difftool]
prompt = false
[merge]
tool = meld
[mergetool "meld"]
path = C:/Program Files (x86)/Meld/meld/meld.exe
[mergetool]
prompt = false
tkdiff for git
# This is Git's per-user configuration file.
[user]
# Please adapt and uncomment the following lines:
# name = Cindy Oda
# email = coda@kitten.local
name = Cindy Oda
email = cindy@rocknrollrobots25.com
[diff]
tool = tkdiff
[difftool]
prompt = false
[difftool "tkdiff"]
trustExitCode = true
cmd = "~/Downloads/tkdiff-4-3-5/tkdiff" \"$LOCAL\" \"$REMOTE\"
[merge]
tool = tkdiff
[mergetool]
prompt = false
[mergetool "tkdiff"]
trustExitCode = true
cmd = "~/Downloads/tkdiff-4-3-5/tkdiff" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
~
~