diff options
author | Vamsi Atluri <vamc19@gmail.com> | 2023-02-11 14:07:24 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-11 16:37:24 +0800 |
commit | ef1fe1bb3bb495cef55c67f9af13065e2415bea0 (patch) | |
tree | c97cf90200c47f9ed8fc5a0785d30c65583d6621 /templates | |
parent | 8350daf505b837984397679f07ccc2324b4d2451 (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')
-rw-r--r-- | templates/install.tmpl | 5 | ||||
-rw-r--r-- | templates/repo/bare.tmpl | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/templates/install.tmpl b/templates/install.tmpl index 49d1a814..d06be82f 100644 --- a/templates/install.tmpl +++ b/templates/install.tmpl @@ -130,7 +130,10 @@ <input name="enable_console_mode" type="checkbox" {{if .enable_console_mode}}checked{{end}}> </div> </div> - + <div class="inline required field"> + <label for="default_branch">{{.i18n.Tr "install.default_branch"}}</label> + <input id="default_branch" name="default_branch" value="{{.default_branch}}" required> + </div> <!-- Optional Settings --> <h4 class="ui dividing header">{{.i18n.Tr "install.optional_title"}}</h4> 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}} |