Last active
August 29, 2019 19:57
-
-
Save justinbarry/1319894b23dbdf81bf30eb52af67d2ff to your computer and use it in GitHub Desktop.
A git helper that creates a branch name based on a github issue title
This file contains hidden or 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 | |
| ((!$#)) && echo Issue number provided, command ignored! && exit 1; | |
| TITLE=$(hub issue show -f %t $1); | |
| ESCAPED_TITLE="GH-$1-${TITLE// /-}"; | |
| git checkout -b $ESCAPED_TITLE; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment