0

use case is, the git repository is a monorepo, I want to know who worked on a sub-project in history and get the name list.

For example, I'd like to know who involved and merged the codes to this sub-folder PackerBuildV1.

Only need target on master/main branch.

https://github.com/microsoft/azure-pipelines-tasks/tree/master/Tasks/PackerBuildV1

any hints for me?

Bill
  • 2,494
  • 5
  • 26
  • 61

1 Answers1

1

Since git ls-files does respect your current folder, you can:

That is:

git clone monorepoURL
cd monorepo/PackerBuildV1 
git ls-files | xargs -n1 git blame --line-porcelain | sed -n
's/^author //p' | sort -d | uniq
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250