← Back to context

Comment by humblebee

7 years ago

When I know what file I'm missing a commit from, I usually end up using `git log` instead.

    git log -p --all --first-parent --remotes --reflog --author-date-order -- somefile

I accidently screwed up a rebase and dropped a test file. It managed to get merged as a blank file (always review after rebase!), I noticed a few days later when a PR was passing which I swore would of failed some tests I had written. Since then I couldn't exactly remember when I made the commit to the file, so trying to search through reflog became difficult. The above command makes it pretty easy as it will show you every change made to a file.