zl程序教程

您现在的位置是:首页 >  工具

当前栏目

[Practical Git] Show who changed a line last with git blame

Git with line show Last CHANGED who
2023-09-14 09:00:53 时间

When working on a file, we often want to know who made certain changes last; we can use git blame to see details about the last modification of each line in a file. In this lesson, we show and example of using git blame to see who made the last change on a line in a file, and then we use the output of git blame to use in other tools like git log to see the full context of why the change was made and what other parts of the code base were effected at the same time as the line from git blame.

 

git blame getURL.js  // check who and when made the last changes to the file

 

Then you will get the commit id, you can use git log to see the detial and commit message:

git log <commit_id> -p