Created
January 16, 2014 00:31
-
-
Save Hamatti/8447583 to your computer and use it in GitHub Desktop.
Added some alias stuff to display git branch description everytime I do git status (or gs as it's aliased for me). That helps me keep on track with branches that are named like issue-[nro] or fix-[nro].
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
function parse_git_branch_name { | |
git rev-parse --abbrev-ref HEAD | |
} | |
function parse_git_description { | |
git config branch.$(parse_git_branch_name).description | |
} | |
alias gs='echo $(parse_git_branch_name): $(parse_git_description) && git status' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! This is very cool. I only just recently using git for more than just linear commits. How would I set up my git to run this script?
Update: I've got the script running! Thanks for writing this!!!