Amongst all the suggestions there I had to find something, that fits my scenario.
First find the commit ID, that includes the deletion of the resp. file (use either--summary
or --raw!) (git log
displays its output through $PAGER, presumably the utilityless
):
$ git log --summary # find the file and the commit ID (in the pager) $ git log --raw # find the file and the commit ID (in the pager)
Now use the commit_ID
to specify, that you are interested in a commit to that file but before that commit_ID
, therefore the “^” after commit_ID
:
$ git checkout commit_ID^ THE_FILE
…