Git Search History for Specific Line of Code or String
Dec 9, 2011 · 1 minute readCategory: git
This is post is now quite old and the the information it contains may be out of date or innacurate.
If you find any errors or have any suggestions to update the information please let us know or create a pull request on GitHub
You can search git log for a specific string with the -S flag
eg, searching for a constant definition
git -log -SCONSTANT_NAME
very handy indeed :)