aboutsummaryrefslogtreecommitdiff
path: root/templates/repo/bare.tmpl
diff options
context:
space:
mode:
authorVamsi Atluri <vamc19@gmail.com>2023-02-11 14:07:24 +0530
committerGitHub <noreply@github.com>2023-02-11 16:37:24 +0800
commitef1fe1bb3bb495cef55c67f9af13065e2415bea0 (patch)
treec97cf90200c47f9ed8fc5a0785d30c65583d6621 /templates/repo/bare.tmpl
parent8350daf505b837984397679f07ccc2324b4d2451 (diff)
conf: add new config option for default branch name (#7291)
Co-authored-by: Vamsi Atluri <me@vamc19.dev> Co-authored-by: Joe Chen <jc@unknwon.io>
Diffstat (limited to 'templates/repo/bare.tmpl')
-rw-r--r--templates/repo/bare.tmpl4
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/bare.tmpl b/templates/repo/bare.tmpl
index b08d3eea..92d555a5 100644
--- a/templates/repo/bare.tmpl
+++ b/templates/repo/bare.tmpl
@@ -39,7 +39,7 @@ git init
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 master</code></pre>
+git push -u origin {{ $.Repository.DefaultBranch }}</code></pre>
</div>
</div>
<div class="ui divider"></div>
@@ -48,7 +48,7 @@ git push -u origin master</code></pre>
<h3>{{.i18n.Tr "repo.push_exist_repo"}}</h3>
<div class="markdown">
<pre><code>git remote add origin <span class="clone-url">{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}</span>
-git push -u origin master</code></pre>
+git push -u origin {{ $.Repository.DefaultBranch }}</code></pre>
</div>
</div>
{{else}}