Issue
The problem is that strings with two qoutes are searched well. But! I want to look for a string "Agent
(one double quote!) inside my repo on cmd in Windows. So I having this:
git grep "\"Agent\"" > 1.txt
(it works! all strings with "Agent"
was found)
git grep "\"Agent" > 1.txt
(error! fatal: ambiguous argument '>': unknown revision...
)
Any ideas how to properly escape?
Solution
In Git CMD or Windows cmd console, you can use ^
to escape the "
inside the terminal:
git grep ""^""Agent" > 1.txt
In Git Bash, you can simply use
git grep '"Agent' > 1.txt
See this text I made on my data with "Regex
pattern:
Answered By - Wiktor Stribiżew Answer Checked By - Pedro (WPSolving Volunteer)