Commit 104e2f92 authored by Jacob Vosmaer's avatar Jacob Vosmaer
Browse files

Handle missing master branch

parent ed276847
......@@ -12,4 +12,10 @@ fi
git remote add ${remote_name} ${gitlab_upstream:-https://gitlab.com/gitlab-org/gitlab-ce.git}
git remote set-url --push ${remote_name} none # make 'upstream' fetch-only
git fetch ${remote_name} master
git branch --set-upstream-to=${remote_name}/master master
# check if the 'master' branch already exists
if git show-ref --verify --quiet refs/heads/master ; then
git branch --set-upstream-to=${remote_name}/master master
else
git branch master ${remote_name}/master
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment