What happens when your friend removes some of your files because he thought it was not needed and then you want to rebase and it is gone. There are several ways to recover the file, by going to github and checking on its history, but here I will present two methods of how to do this. The first one is via a log command and the second is via a rev-list command.
git log --pretty=oneline -- <file_path> | tac
This way we reverse the output of a git log regarding the file in question. But now let’s look at a more interesting way:
In case you also want to review more than one commit you can vary the 1 above to include more commits that have to do with the file in question.