Git diff with line numbers (Git log with line numbers)

后端 未结 9 874
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-29 18:57

When I do a git diff or a git log -p, how do I get line numbers of the source file(s) inlined with the output?

I tried to look it up

9条回答
  •  半阙折子戏
    2020-11-29 19:15

    You can try

    git blame
    

    on the file. It shows you the committer, commit id, and line number for each line in the file.

提交回复
热议问题