Skip to content

Instantly share code, notes, and snippets.

@inky
Created May 26, 2014 23:34
Show Gist options
  • Select an option

  • Save inky/29a04d3d488474c43e60 to your computer and use it in GitHub Desktop.

Select an option

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'.
#!/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