Cannot git diff. File exists in both branches but getting "fatal: Path '...' exists on disk, but not in 'master'"?

Viewed 2273

This is what I get when trying to compare a file between a branch and master:

git diff gamemodes/terrortown/entities/entities/ttt_c4/shared.lua  
         master:gamemodes/terrortown/entities/entities/ttt_c4/shared.lua

fatal: Path 'gamemodes/terrortown/entities/entities/ttt_c4/shared.lua' 
       exists on disk, but not in 'master'.

Here is the file on master:

$ git log -n 1 -- gamemodes/terrortown/entities/entities/ttt_c4/shared.lua
commit d0241471298ce617b68dcf268be1c0af0cf8170c
Author: me
Date:   Fri Jan 1 23:25:17 2016 -0600

    December 2015 Update

And here is the file on my branch real_disarm:

$ git log -n 1 -- gamemodes/terrortown/entities/entities/ttt_c4/shared.lua
commit 84a7de46b92b8747cf98a57a8f7101682377980e
Author: me
Date:   Sun Jan 10 00:27:33 2016 -0600

    Remove trailing whitespace

Obviously the file exists in both branches. The whole reason I'm comparing the files is because I'm trying to remove trailing whitespace so that my patches don't give annoying "warning: squelched 5 whitespace errors warning: 10 lines add whitespace errors." output.

1 Answers
Related