I am trying to set up opendiff as my graphical git difftool. In other words, I want opendiff to open a graphical window and show my file changes when I type git difftool
on the command line. I've added the following configuration to my ~/.gitconfig
:
[diff]
tool = opendiff
[difftool]
prompt = false
[difftool "opendiff"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
When I run git difftool
in most repositories, it opens opendiff as I desire, but in one particular repo, it always just shows me a text diff in the terminal.
I've run git config --list
in both repositories and the only differences are those you'd expect - origin and branch names, and such - all the diff settings are identical.
So - what else could be causing git to work differently in these two repositories?
EDIT:
Contents of the badly behaving repo's .git/config
, slightly redacted:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[remote "origin"]
url = git@<ORIGIN_URL>
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "develop"]
remote = origin
merge = refs/heads/develop
[branch "feature/FEATURE1"]
remote = origin
merge = refs/heads/FEATURE1
[branch "feature/FEATURE2"]
remote = origin
merge = refs/heads/FEATURE2
EDIT2:
This is the diff between git config --list
in both repos, slightly redacted:
40c40
< remote.origin.url=git@<GOOD_REPO_URL>
---
> remote.origin.url=git@<BAD_REPO_URL>
42,43c42,47
< branch.master.remote=origin
< branch.master.merge=refs/heads/master
---
> branch.develop.remote=origin
> branch.develop.merge=refs/heads/develop
> branch.feature/FEATURE1.remote=origin
> branch.feature/FEATURE1.merge=refs/heads/feature/FEATURE1
> branch.feature/FEATURE2.remote=origin
> branch.feature/FEATURE2.merge=refs/heads/feature/FEATURE2
EDIT3:
Well, this is embarrassing... I can no longer reproduce the issue! Now it is working in both repos just as I expected. I swear I didn't change anything, guys... Just running from home instead of work. Gremlins?