stackyyflow stackyyflow - 1 month ago 6x
Git Question

Git blame a list of authors in a file

Is there a way to find out a list of authors who edited the class in java file in repo using

git blame
? The list of authors have to be unique.

I have tried using the following command but it did not remove duplicates and there is word "author" in every line of output. There is no need to sort the output, but I hope to get output without any duplicates.

git blame filename --porcelain | grep "^author "

Expected output should be just author name:
John Michael


You can add at the end of the command uniq to make author unique.

git blame filename --porcelain | grep  "^author " | uniq

uniq Documentation