a3743d264a74aeae43a293c484c4018ef8445b85
[git-central.git] / scripts / create-branch
1 #!/bin/sh
2
3 new_branch_name=$1
4
5 # Make sure we have the latest origin/stable to branch
6 git fetch
7
8 # Specifying stable to get the last released code
9 git checkout -b $new_branch_name origin/stable
10
11 # Go ahead and put the branch out on the server
12 git push origin $new_branch_name
13
14 # Setup the merge property so that pulls come from the right place (instead of stable)
15 git config --replace-all "branch.$new_branch_name.merge" "refs/heads/$new_branch_name"
16