Skip to content

Instantly share code, notes, and snippets.

@pascalchevrel
Created October 15, 2014 13:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pascalchevrel/0df93484a5031b533a38 to your computer and use it in GitHub Desktop.
Save pascalchevrel/0df93484a5031b533a38 to your computer and use it in GitHub Desktop.
.bashrc alias to show remote git branches
alias git_show_remote=git_show_remote
function git_show_remote()
{
for k in `git branch -r | perl -pe 's/^..(.*?)( ->.*)?$/\1/'`; do echo -e `git show --pretty=format:"%Cgreen%ci %Cblue%cr%Creset" $k -- | head -n 1`\\t$k; done | sort -r
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment