git tips: list commits where a file was modified

Sometimes we need to find out which commits changed particualr file.

We can ontain this information using command git log with flag — follow:

git log --follow -- filename

This will list all the commits where this file was modified in the foramt of command git log.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store