samjeston / openhub Public
Sam Jeston Working vertical 9aa3c45 · History
34 lines· 1.5 KB ·HTML
Raw
1{% extends "layout_repo.html" %}
2{% block content %}
3{% if !r.repo.description.is_empty() %}<p class="repo-description">{{ r.repo.description }}</p>{% endif %}
4<div class="box quick-setup">
5 <div class="box-header">
6 <h2>Quick setup</h2>
7 <span class="text-muted">This repository is empty. Push some code to get started.</span>
8 </div>
9 <div class="box-body">
10 <div class="input-group">
11 <span class="input-group-label">SSH</span>
12 <input class="input input-mono" type="text" readonly value="{{ r.ssh_url }}" id="empty-ssh" aria-label="SSH clone URL">
13 <button type="button" class="btn" data-copy="#empty-ssh" title="Copy">{{ crate::web::fmt::icon("copy")|safe }}</button>
14 </div>
15 {% if r.access.write %}
16 <h3>…or create a new repository on the command line</h3>
17 <pre class="command">echo "# {{ r.repo.name }}" &gt;&gt; README.md
18git init
19git add README.md
20git commit -m "first commit"
21git branch -M {{ r.repo.default_branch }}
22git remote add origin {{ r.ssh_url }}
23git push -u origin {{ r.repo.default_branch }}</pre>
24 <h3>…or push an existing repository from the command line</h3>
25 <pre class="command">git remote add origin {{ r.ssh_url }}
26git branch -M {{ r.repo.default_branch }}
27git push -u origin {{ r.repo.default_branch }}</pre>
28 <p class="text-muted text-small">Pushing requires an SSH key on your account. <a href="/settings/keys">Manage SSH keys</a>.</p>
29 {% else %}
30 <p class="text-muted">Nothing has been pushed to this repository yet.</p>
31 {% endif %}
32 </div>
33</div>
34{% endblock %}