Git who changed a line

Here's how IĀ find out when a certain phrase was added to a file in Git. The following command will show what commit was added, who added it, when it was added, and print out a diff:

git log -S"important phrase" -p -- $filename

Internal References

Article Type

General