Git: Finding all commits that match a given line
If you need to show all the commits that modify a specific line you can use git log
and the -G
flag like this:
git log -G "version" docs/release_history.txt
This will show every commit that contains "version" in one of the modified lines anywhere the file /docs/release_history.txt