Thomas Kessler
Thomas Kessler

Reputation: 1807

How to search git repo history for a quoted string?

I can search git commit history for a string, but how do I search for a quoted string? This is how I search for a string:

git grep "some text here" $(git rev-list --all)

Upvotes: 0

Views: 228

Answers (1)

hek2mgl
hek2mgl

Reputation: 158020

Just use single quotes:

git grep '"string"' ...

Upvotes: 2

Related Questions