Reputation: 35
I Know in file foo.cpp Following Line has been added some time this year
if(engL.showPrompt()>engL.lessPrompt())
executeScript();
How to find which commit pushed this change?
Upvotes: 0
Views: 118
Reputation: 26371
If the change is not in the last commit, you can use
git log -S"if(engL.showPrompt()>engL.lessPrompt()) executeScript()" -- path/to/file
Upvotes: 3
Reputation: 44962
git blame foo.cpp
will show you line by line what commit was the last one to contribute to that line.
Upvotes: 4