Finding the commit a file was introduced in [Git]

Was going through the git log man page and noticed that there is a –reverse option. Guess what cool thing this could be used for? To find the commit in which a certain file was introduced in!

git log --reverse -- somefile.c

The commit on top is the first commit in which somefile.c appeared.

Post a comment or leave a trackback: Trackback URL.

Leave a Reply