-
-
Save littlelazer/2783198 to your computer and use it in GitHub Desktop.
Quick shell script to check the freshness of your git branches
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Place this file somewhere in your path and make it executable | |
# Can then be ran within any repo by calling `git fresh` within that folder | |
# | |
( | |
for b in `git branch | sed 's:^[ *]*::'` | |
do | |
git log -n 1 $b -- | sed -e '4,$ d' -e '1,2 d' -e "s^Date:[ ]*^^" -e "s^\(.*\)$^\1 ~~~ ${b}^" | |
done | |
) | sort -k 5,5nr -k 2,2Mr -k 3,3nr -k 4,4nr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment