-
-
Save ahmedelgabri/2684c4578c3fe5990c5a to your computer and use it in GitHub Desktop.
A script to list branches by date http://davidwalsh.name/git-branches-date
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/sh | |
# | |
# Usage: bbd "Sep 14" | |
# bbd "Sep" | |
git reflog --date=local | grep "$1 .* checkout: moving from .* to" | grep -o "[a-zA-Z0-9\-]*$" | sort | uniq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you name this something like
git-bbd
and put it in your$PATH
, then you can call in the context of git such asgit bbd Sep
. Doesn't necessarily improve the script but does keep it within the git ecosystem. Or you could put this in your git aliases as such and call it the same way: