Skip to content

Instantly share code, notes, and snippets.

@brennie
Created January 19, 2024 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brennie/53591954ca312da11cbd0ad15ec46f78 to your computer and use it in GitHub Desktop.
Save brennie/53591954ca312da11cbd0ad15ec46f78 to your computer and use it in GitHub Desktop.
#!/bin/bash
column -t -s$'\t' < <(
readarray -t BRANCHES < <(git branch --list --format "%(refname:short)")
for BRANCH in "${BRANCHES[@]}"; do
SUMMARY=$(git log --oneline -1 "${BRANCH}" --pretty="format:%s")
echo -e "${BRANCH}\t${SUMMARY}"
done
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment