You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
2.7 KiB

  1. {{template "base/head" .}}
  2. <div class="repository quickstart">
  3. {{template "repo/header" .}}
  4. <div class="ui container">
  5. <div class="ui grid">
  6. <div class="sixteen wide column content">
  7. {{template "base/alert" .}}
  8. {{if .IsRepositoryAdmin}}
  9. <h4 class="ui top attached header">
  10. {{.i18n.Tr "repo.quick_guide"}}
  11. <div class="ui right">
  12. <a class="ui black tiny button" href="{{.RepoLink}}/settings">{{.i18n.Tr "repo.settings"}}</a>
  13. </div>
  14. </h4>
  15. <div class="ui attached guide table segment">
  16. <div class="item">
  17. <h3>{{.i18n.Tr "repo.clone_this_repo"}} <small>{{.i18n.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository" | Str2html}}</small></h3>
  18. <div class="ui action small input">
  19. {{if not $.DisableHTTP}}
  20. <button class="ui basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">
  21. {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
  22. </button>
  23. {{end}}
  24. {{if not $.DisableSSH}}
  25. <button class="ui basic clone button" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">
  26. SSH
  27. </button>
  28. {{end}}
  29. {{if not $.DisableHTTP}}
  30. <input id="repo-clone-url" value="{{$.CloneLink.HTTPS}}" readonly>
  31. {{else}}
  32. <input id="repo-clone-url" value="{{$.CloneLink.SSH}}" readonly>
  33. {{end}}
  34. <button class="ui basic button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
  35. <i class="octicon octicon-clippy"></i>
  36. </button>
  37. </div>
  38. </div>
  39. <div class="ui divider"></div>
  40. <div class="item">
  41. <h3>{{.i18n.Tr "repo.create_new_repo_command"}}</h3>
  42. <div class="markdown">
  43. <pre><code>touch README.md
  44. git init
  45. git add README.md
  46. git commit -m "first commit"
  47. git remote add origin <span class="clone-url">{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}</span>
  48. git push -u origin master</code></pre>
  49. </div>
  50. </div>
  51. <div class="ui divider"></div>
  52. <div class="item">
  53. <h3>{{.i18n.Tr "repo.push_exist_repo"}}</h3>
  54. <div class="markdown">
  55. <pre><code>git remote add origin <span class="clone-url">{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}</span>
  56. git push -u origin master</code></pre>
  57. </div>
  58. </div>
  59. {{end}}
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. {{template "base/footer" .}}