I'm doing a Git repository viewer, and I need to get the name of the repository author and email.
The following command returns me the author of a commit.
git show --format="%aN <%aE>"
I need it to return the author of the repository.
I'm doing a Git repository viewer, and I need to get the name of the repository author and email.
The following command returns me the author of a commit.
git show --format="%aN <%aE>"
I need it to return the author of the repository.
Git does not store any meta data for the owner of the repository. But you can list the commits in ascending order time with:
git for-each-ref --format='%(committerdate) %09 %(authorname) %09 %(refname)' | sort -k5n -k2M -k3n -k4n
Please refer to Find out a Git branch creator.