My repository underwent changes such as:
- ...some unrelated commits...
- Commit new file
foo
with 100 lines of content - ...intervening commits, some of which touch
foo
... - Insert the contents of
foo
at the top of an existing filebar
andgit rm foo
in the same commit - ...more unrelated commits...
Now I want to see the log of deleted file foo
. Everything I've read, including on SO, says I should be able to git log -- foo
, but that command produces no output.
If I find the commit that includes deleting foo
I can git log 1234abcd -- foo
and see its log, so I think my path to foo
isn't the problem. Also note that git merge-base HEAD 1234abcd
outputs 1234abcd[...]
, so I think that should prove the commit is reachable from HEAD
. Note that there is no file foo
in my working tree (obvious, since it was deleted). Using Git 1.7.1.1 on OS X.
Why doesn't git log -- foo
work for me and how can I fix it? Thanks!