Git-Repo searching for String in all committed files (unknown branch and commit)

Use git grep to locate the commit:

git grep "string" $(git rev-list --all)

The git rev-list --all makes it search the entire history of the project.

That will give an output like this:

<commit>:<path>:<matched line>

Then you can use git branch --contains to find out which branch the commit is on:

git branch --contains <commit>

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)