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:-}
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
git branch master ${remote_name}/master
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