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

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
原文地址:https://www.cnblogs.com/Answer1215/p/5763453.html