From c96da610c2db2427e6cbe183497bd6c09b15b9dc Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Sun, 5 Jul 2020 14:56:10 +0200 Subject: [PATCH] templates/repo/empty.tmpl : fix repo setup instructions (#12147) Co-authored-by: codeberg Co-authored-by: zeripath --- templates/repo/empty.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/repo/empty.tmpl b/templates/repo/empty.tmpl index 9aa0706c2..4067bce71 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}}