Reputation: 6364
I have managed to find a resource to search for "a" string in all commits (link below). But I do not know how to do the same command and have the specific files within the commits be listed (which added or lost that string).
All commits would be good but ideally I'd also like to get a list of files that added or lost that string within a specific commit. How would I do this for all or a specific commit?
Finding a Git commit that introduced a string in any branch
Upvotes: 2
Views: 236
Reputation: 1328202
You can get the log of a specific commit with:
git log -1 <aSHA1>
So add your pickaxe search to that:
git log --name-only -1 -S "<whatever>" <aSHA1>
Upvotes: 1