Last active
September 15, 2018 14:59
-
-
Save Createdd/93a8582bde38112ede09e08beb889970 to your computer and use it in GitHub Desktop.
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/sh | |
| echo "$branchName" | |
| if [ "$branchName" = "master" ]; then | |
| exit 0 | |
| fi | |
| if [[ "$branchName" =~ ^[a-z]+[\/]+[A-Z]+[\-]+[0-9]+[\_]+[a-zA-Z] ]]; then | |
| echo "Good branch name!" | |
| exit 0 | |
| else | |
| echo "Rename with 'git branch -m <newBranchName>'" | |
| exit 1 | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment