Skip to content

Instantly share code, notes, and snippets.

@jonjack
Created April 6, 2022 11:46
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 jonjack/b922ec15df00123511c4a384e851cb4e to your computer and use it in GitHub Desktop.
Save jonjack/b922ec15df00123511c4a384e851cb4e to your computer and use it in GitHub Desktop.
Display textual history of all commits in Git branch.
#!/usr/bin/env zsh
git show-branch -a \
| grep '\*' \
| grep -v `git rev-parse --abbrev-ref HEAD` \
| head -n1 \
| sed 's/.*\[\(.*\)\].*/\1/' \
| sed 's/[\^~].*//'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment