Created
May 26, 2014 23:34
-
-
Save inky/29a04d3d488474c43e60 to your computer and use it in GitHub Desktop.
Initialise a git repository and replace the 'master' branch with 'develop' and 'release'.
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 | |
| set -o errexit | |
| set -o nounset | |
| git symbolic-ref -q HEAD 2> /dev/null && { | |
| echo 'error: a git repository already exists' | |
| exit 1 | |
| } | |
| git init | |
| git commit -m Init --allow-empty | |
| git branch develop master | |
| git branch release master | |
| git checkout develop | |
| git branch --delete master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment