Find when line was deleted

前端 未结 3 2102
礼貌的吻别
礼貌的吻别 2020-12-04 21:08

Earlier today I discovered that some code was missing from my Git repository. I knew some of the missing text, and the file that it was in, so I used git log -S\'missi

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-04 21:28

    git log doesn't show a diff for merge commits by default. The -c or --cc flags should do the trick:

    git log -c -S'missingtext' /path/to/file

    More discussion/explanation is here.

提交回复
热议问题