diff --git a/templates/repo/empty.tmpl b/templates/repo/empty.tmpl index 9aa0706c29..4067bce716 100644 --- a/templates/repo/empty.tmpl +++ b/templates/repo/empty.tmpl @@ -49,7 +49,7 @@
touch README.md
git init
-{{if ne .Repository.DefaultBranch "master"}}git branch -m master {{.Repository.DefaultBranch}}{{end}}
+{{if ne .Repository.DefaultBranch "master"}}git checkout -b {{.Repository.DefaultBranch}}{{end}}
git add README.md
git commit -m "first commit"
git remote add origin {{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}