How can you search for a certain line of code, in a file that was also (maybe) deleted without knowing the name of the file?
To be more specific, a month ago I was working on a script and got it working to our needs, however a rather special case occured. We are certain that in the past there existed a file that contained the the line/word x-shared-component. This line doesn't seem to exist anymore in the current repository. We're not sure wether that line was removed in the past or if the file (name also not known) was just deleted.
I've tried:
- To look in the current HEAD if any file contains that line with
git grep -i "x-shared-components" git log -p --all | grep -i "x-shared-components"git grep -i "x-shared-components" $(git rev-list --all)
Is there something missing that I'm not taking into consideration? I tried to delete a file and search for its content with git log -p --all | grep -i <regex> and i was able to find lines. If I can't seem to find any results, does that mean such a line actually never existed in the current git repository?
You are looking for
git log -Gorgit log -S: