Question

I had a file "config.ru" in one of my branches (I can't remember which one), and at some point I added it to ".gitignore" (which may or may not be relevant -- I'm not sure).

Now I would like to find it in my history and view it. I have tried git log --all -- config.ru but it produced no results. How can I find the file?

Was it helpful?

Solution

you can try

git log --all --stat | grep -10 "config.ru"

--stat option shows the commit log with filename.

or

git log --walk-reflogs --stat | grep -10 "config.ru"

--walk-reflogs option shows the reflog commit intead of walking the commit ancestry chain.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top