summaryrefslogtreecommitdiffstats
path: root/templates/repo/empty.tmpl
diff options
context:
space:
mode:
authortechknowlogick <techknowlogick@gitea.io>2020-06-17 16:53:55 -0400
committerGitHub <noreply@github.com>2020-06-17 16:53:55 -0400
commit6bf78d2b576a5caa77a670db9bbf2572d0272f25 (patch)
tree36b547e948ac0c1aed41c5088f397ea50fa905ee /templates/repo/empty.tmpl
parent9e6a79bea9d7911c81b86a6d3715d340fc19032a (diff)
downloadgitea-6bf78d2b576a5caa77a670db9bbf2572d0272f25.tar.gz
gitea-6bf78d2b576a5caa77a670db9bbf2572d0272f25.zip
Global default branch setting (#11918)
* Global default branch setting * add to app.ini example per @silverwind * update per @lunny Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Diffstat (limited to 'templates/repo/empty.tmpl')
-rw-r--r--templates/repo/empty.tmpl3
1 files changed, 2 insertions, 1 deletions
diff --git a/templates/repo/empty.tmpl b/templates/repo/empty.tmpl
index 8efb6d2866..9aa0706c29 100644
--- a/templates/repo/empty.tmpl
+++ b/templates/repo/empty.tmpl
@@ -49,10 +49,11 @@
<div class="markdown">
<pre><code>touch README.md
git init
+{{if ne .Repository.DefaultBranch "master"}}git branch -m master {{.Repository.DefaultBranch}}{{end}}
git add README.md
git commit -m "first commit"
git remote add origin <span class="clone-url">{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}</span>
-git push -u origin {{if ne .Repository.DefaultBranch "master"}}master:{{.Repository.DefaultBranch}}{{else}}master{{end}}</code></pre>
+git push -u origin {{.Repository.DefaultBranch}}</code></pre>
</div>
</div>
<div class="ui divider"></div>