Git + How to get or view all remote branches of a author or by an author


function gbl() {

git for-each-ref --sort=-committerdate --format='%(committerdate) %(authorname) %(refname)' refs/remotes/origin/|grep -e ".$@"|head -n 10;

}

Add the above function to bash_profile / profile. And then you can call like, >> gbl author


>> vim ~/.profile

add the following line,

function gbl() { git for-each-ref --sort=-committerdate --format='%(committerdate) %(authorname) %(refname)' refs/remotes/origin/|grep -e ".$@"|head -n 10; }


then call it like below,

>> gbl author_name