Find out when a file was removed from GitHub repo

I was looking for a file in GitHub repo, but didn’t manage to find it. How to check if a file was in a repository and/or when it was removed?

The below command shows the whole file history (even when a file has already been removed):

git log -- [file path]

The below one shows a commit which removed a file:

git log -1 -- [file_path]
 

Igor Springer

I build web apps. From time to time I put my thoughts on paper. I hope that some of them will be valuable for you. To teach is to learn twice.

 

Leave a Reply

Your email address will not be published. Required fields are marked *