{{if ne .Repository.DefaultBranch "master"}}git checkout -b {{.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 remote add origin <span class="clone-url">{{$.CloneLink.HTTPS}}</span>
git push -u origin {{.Repository.DefaultBranch}}</code></pre>
</div>
</div>
<div class="item">
<h3>{{.i18n.Tr "repo.push_exist_repo"}}</h3>
<div class="markup">
- <pre><code>git remote add origin <span class="clone-url">{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}</span>
+ <pre><code>git remote add origin <span class="clone-url">{{$.CloneLink.HTTPS}}</span>
git push -u origin {{.Repository.DefaultBranch}}</code></pre>
</div>
</div>
+ <script defer>
+ /* eslint-disable no-undef */
+ const cloneUrls = document.getElementsByClassName('clone-url');
+ if (cloneUrls) {
+ for (let i = 0; i < cloneUrls.length; i++) {
+ cloneUrls[i].textContent = (isSSH ? sshButton : httpsButton).dataset.link;
+ }
+ }
+ </script>
{{end}}
{{else}}
<div class="ui segment center">