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



Note: Replies will be formatted with PHP Markdown Extra syntax.

Name: Email (Not Required):
 
Logged IP: 3.146.255.127
To prevent spam please submit by clicking the kitten: