diff --git a/templates/repo/clone_buttons.tmpl b/templates/repo/clone_buttons.tmpl index 5affc5f32..b3aac28db 100644 --- a/templates/repo/clone_buttons.tmpl +++ b/templates/repo/clone_buttons.tmpl @@ -9,16 +9,7 @@ SSH {{end}} - - - + diff --git a/templates/repo/clone_script.tmpl b/templates/repo/clone_script.tmpl new file mode 100644 index 000000000..48b7ad329 --- /dev/null +++ b/templates/repo/clone_script.tmpl @@ -0,0 +1,23 @@ + diff --git a/templates/repo/empty.tmpl b/templates/repo/empty.tmpl index eee607eca..7703cb661 100644 --- a/templates/repo/empty.tmpl +++ b/templates/repo/empty.tmpl @@ -37,7 +37,7 @@ git init {{if ne .Repository.DefaultBranch "master"}}git checkout -b {{.Repository.DefaultBranch}}{{end}} git add README.md git commit -m "first commit" -git remote add origin +git remote add origin {{$.CloneButtonOriginLink.HTTPS}} git push -u origin {{.Repository.DefaultBranch}} @@ -46,24 +46,11 @@ git push -u origin {{.Repository.DefaultBranch}}

{{.i18n.Tr "repo.push_exist_repo"}}

-
git remote add origin 
+									
git remote add origin {{$.CloneButtonOriginLink.HTTPS}}
 git push -u origin {{.Repository.DefaultBranch}}
- - + {{template "repo/clone_script" .}} {{end}} {{else}}
diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 1a0323f5d..28cb9df63 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -124,6 +124,7 @@ {{if eq $n 0}}
{{template "repo/clone_buttons" .}} + {{template "repo/clone_script" .}}