Created
February 18, 2016 17:44
-
-
Save andrewchilds/d056bdd49cda367c3a75 to your computer and use it in GitHub Desktop.
A more GitHub-like `git branch`
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 | |
# gitbr | |
# | |
# Example output: | |
# | |
# $ gitbr | |
# | |
# 3 months ago ac/1999/labels-redesign-spike | |
# 745f166 WIP. | |
# | |
# 2 months ago ac/2183/use-search-endpoint-on-epics-page | |
# 2311ea8 WIP. | |
# | |
# 22 days ago ac/2963/drag-and-drop-refactor | |
# 5503b77 WIP. | |
# | |
# 14 hours ago master | |
# 431319b Fix Zendesk #123 | |
# | |
function gitbr { | |
git for-each-ref --sort=committerdate refs/heads/ \ | |
--format='%(color:green)%(committerdate:relative) AWK_PIPE %(color:reset)%(refname:short) AWK_PIPE %(color:yellow)%(objectname:short) %(color:blue)%(contents:subject)' \ | |
| awk 'BEGIN { FS = " AWK_PIPE " } ; { printf "\n%-19s %s\n %s\n", $1, $2, $3 }' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
screenshot
