Skip to content

Instantly share code, notes, and snippets.

@nobu666
Last active August 29, 2015 14:25
Show Gist options
  • Save nobu666/ed917292ef575e155372 to your computer and use it in GitHub Desktop.
Save nobu666/ed917292ef575e155372 to your computer and use it in GitHub Desktop.
branch名と--edit-descriptionでつけた説明を並べて表示する
for branch in $(git for-each-ref --format='%(refname)' refs/heads/ | sed 's|refs/heads/||'); do desc=$(git config branch.$branch.description); if [[ "$branch" == "$(git rev-parse --abbrev-ref HEAD)" ]]; then branch="* \033[0;32m$branch\033[0m"; else branch=" $branch"; fi; echo -e "$branch \033[0;36m$desc\033[0m"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment