git 查看某一行代码的修改历史

查看某行代码谁写的:

git blame file_name
git blame -L 58,100 file_name  # 58~100 行代码

其输出格式为:

commit_ID | 代码提交作者 | 提交时间 | 代码位于文件中的行数 | 实际代码 

根据 commit_ID 可以查看对应的提交记录:

git show commit_ID
posted @ 2020-04-02 12:38  刘-皇叔  阅读(14265)  评论(0编辑  收藏  举报