Issue
I manage to find the word that I desire with the following command in a github repository
git log --all -p | grep 'abc'
abc
is a word located in a specific file.
My question is how can I find the file path to the string that I desire? How can I know which file contain the word that I want which is abc
?
For example, doing the above command would get me
(this.b(),this.abc);
but I would like to know which exact folder and which exact file is this piece of string/code coming from.
Any suggestion is appreciated.
Solution
git grep -l 'abc'
Option -l
list file names where the pattern is found in the current (HEAD
) commit.
Answered By - phd Answer Checked By - Marilyn (WPSolving Volunteer)