Hacker News new | past | comments | ask | show | jobs | submit login

> Find every commit that added or removed some text > git log -S banana

I literally spend half an hour the other day having an argument with chatGPT about how I could find versions of a file that contained a specific string. Guess I should have asked for commits and not versions of files.




git log -G is much more often what I want - diff contains some text but doesn't necessarily add or remove it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: