Finding authors of all remote branches in a git repository.

1 min read
Share:

Git is a widely adopted Version Control System known for its branching support. Recently I was required to find out all the remote branches with their author names. Upon browsing over the web I found that command git-for-each-ref can help me.

Here is how I combined it with grep to get the desired output:

[code]
git for-each-ref –format=’%(authorname) %09 %(refname)’ | grep origin
[/code]

I hope it helps.

Cheers

comments ( 1 )

  1. This is the author of the last commit of all branches, not the author of the branch (I means it’s not the creator of the branch).

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *