Skip to content

Instantly share code, notes, and snippets.

@dylanirlbeck
Created June 18, 2021 17:17
Show Gist options
  • Save dylanirlbeck/53a43c1a7150675441667ecbbf50f6d2 to your computer and use it in GitHub Desktop.
Save dylanirlbeck/53a43c1a7150675441667ecbbf50f6d2 to your computer and use it in GitHub Desktop.

The following script will list the creators of all the files in a Git tree. (In this case, the repository is 18F/handbook.)

git ls-tree -r --name-only HEAD _pages | while read filename; do
  echo "$(git log --diff-filter=A --follow  --format="%an%aI" --reverse -- $filename) $filename"
done

Source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment