Friday, November 9, 2018

git - check source code of a file for a range of commits



See history for two lines in a file

 git log --pretty=short -u -L 6,7:Dockerfile


here, 6,7 represents the line no. Adjust according to your needs.

git version should be 1.8.4  or later .


originally from : https://stackoverflow.com/questions/8435343/retrieve-the-commit-log-for-a-specific-line-in-a-file/31985012

No comments:

Post a Comment