Search code examples
gitgit-history

Search for a file in GIT history?


So there was a file in one of my projects which was deleted, no one knows when or why, it's just gonne. (a few months probably). Problem is i only know a part of the name, not the full name. How can i search the files added/removed in commits (not commit message) for this?

The file should look like something_something.*.xml, any ideas? [the * can be a string, or multiple string separated by underscore, dash or dot]


Solution

  • You can do git log --all --full-history -- **/theFile.*