Finding authors of all remote branches in a git repository.

16 / Jun / 2015 by Manish Kapoor 0 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:

git for-each-ref --format='%(authorname) %09 %(refname)' | grep origin

I hope it helps.

Cheers

FOUND THIS USEFUL? SHARE IT

Leave a comment -