Git /
GrepEver wondered what happened to that wonderful piece of code or text you wrote and isn't in the source anymore? After making sure it isn't by looking through the source with Grep, or:
to look through the whole tree for
If it is still missing, you can look in the whole history of the repo with
This uses
By extension1, it is possible to: Search all revisions between commit1 and commit2 for text:
Note that instances of Search working tree for lines of text matching regular expression regexp1 or regexp2:
Search working tree for lines of text matching regular expression regexp1 and regexp2, reporting file paths only:
Search working tree for files that have lines of text matching regular expression regexp1 and lines of text matching regular expression regexp2:
All of which can be combined. 1The following content was found on Stack Overflow. Thanks to the original responders! |