Reputation: 10151
I have always wondered to know the commiter/author of a particular piece of code by looking up the git history.
Using git, can I know the author who commited this piece of code by looking in the git history?
Upvotes: 0
Views: 440
Reputation: 150565
Git has multiple ways of showing who changed what.
git blame
shows the changes by author and commit per line as odez909 has answered.git log
will also show you who created the change in the author field.git log
will also show a 'committer' field. This is useful in a distributed version control system like git and it shows the person who added the commit to the repository, and it may not be the author.Upvotes: 0