Finding authors of all remote branches in a git repository.

16 / Jun / 2015 by Manish Kapoor 1 comments

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

FOUND THIS USEFUL? SHARE IT

comments (1 “Finding authors of all remote branches in a git repository.”)

  1. Urbain Arnaud

    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 *