Skip to content

Commit ec8a44f

Browse files
committed
updating rendered materials
1 parent 3c4ce15 commit ec8a44f

3 files changed

Lines changed: 44 additions & 60 deletions

File tree

‎_sources/topics/01-setting_up/github_classroom.rst.txt‎

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -115,22 +115,24 @@ d) Clone the repo
115115
This will create a new directory for the repository, named by the assignment and your gitHub handle -- this is where you will put all the work for that assignment.
116116

117117

118-
3) Create a develop branch for your work
119-
----------------------------------------
118+
3) Use the develop branch for your work
119+
---------------------------------------
120120

121-
Create and check out a new branch for your work.
121+
Check out a different branch for your work.
122122

123123
a) Change the working directory to the repo just created by the clone:
124124

125125
::
126126

127127
cd the_name_of_the_assignment_repo
128128

129-
b) Make a new branch:
129+
b) Checkout the develop branch
130130

131131
::
132132

133-
git checkout -b develop
133+
git checkout develop
134+
135+
Note: there should be a "develop" branch already in the repo. If not, you will get an error, but you can create the branch by hand by adding the ``-b`` flag: ``git checkout -b develop``
134136

135137
After that command, git will be "in" the develop branch -- anything you change will only be reflected in that branch.
136138

@@ -225,33 +227,21 @@ In order to get your changes up to gitHub you need to "push" them. It's always a
225227
Note that I am on the "develop" branch, which is what's wanted, and nothing new to commit -- all my changes have been committed -- it's time to push.
226228

227229
::
228-
229230
$ git push
230-
fatal: The current branch develop has no upstream branch.
231-
To push the current branch and set the remote as upstream, use
232-
233-
git push --set-upstream origin develop
231+
Enumerating objects: 5, done.
232+
Counting objects: 100% (5/5), done.
233+
Delta compression using up to 4 threads
234+
Compressing objects: 100% (3/3), done.
235+
Writing objects: 100% (3/3), 354 bytes | 354.00 KiB/s, done.
236+
Total 3 (delta 1), reused 0 (delta 0)
237+
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
238+
To https://github.com/UWPCE-Py310-Fall2020/fizz-buzz-PythonCHB.git
239+
46d868a..fe3e479 develop -> develop
234240

235-
Hmm -- "fatal" -- I don't like the look of that! But it's pretty simple, really. git is telling you that it doesn't know where to push the code to -- your gitHub version of the repo doesn't have a develop branch. But it tells you want to do to create that branch on gitHub (origin), so do that:
241+
.. note:: If you don't have a develop branch up on gitHUb, you will get a "fatal" Error. Scary, but it's pretty simple, really. git is telling you that it doesn't know where to push the code to -- your gitHub version of the repo doesn't have a develop branch. But it tells you want to do to create that branch on gitHub (origin), so do that: ``git push --set-upstream origin develop`` -- and you should be good to go.
236242

237-
::
243+
Now the local develop branch is hooked up to a develop branch on gitHub.
238244

239-
$ git push --set-upstream origin develop
240-
Enumerating objects: 4, done.
241-
Counting objects: 100% (4/4), done.
242-
Delta compression using up to 4 threads
243-
Compressing objects: 100% (3/3), done.
244-
Writing objects: 100% (3/3), 639 bytes | 319.00 KiB/s, done.
245-
Total 3 (delta 0), reused 0 (delta 0)
246-
remote:
247-
remote: Create a pull request for 'develop' on gitHub by visiting:
248-
remote: https://github.com/UWPCE-Py310-Fall2020/initial-setup-PythonCHB/pull/new/develop
249-
remote:
250-
To https://github.com/UWPCE-Py310-Fall2020/initial-setup-PythonCHB.git
251-
* [new branch] develop -> develop
252-
Branch 'develop' set up to track remote branch 'develop' from 'origin'.
253-
254-
Good -- now the local develop branch is hooked up to a develop branch on gitHub. And it even tells you what to do next -- see the "Create a pull request for 'develop' on gitHub by visiting:" -- that's exactly what you need to do!
255245

256246
6) Complete the Assignment
257247
--------------------------
@@ -345,7 +335,7 @@ I'm sure this seems like a lot, but it will get to be a habit, Here are the step
345335

346336
2) Clone the resulting repo onto your work machine (``git clone``)
347337

348-
3) Make a develop branch (``git checkout -b develop``)
338+
3) Switch to the develop branch (``git checkout develop``)
349339

350340
4) Do the assignment in the develop branch, committing and pushing as you go. (``git add``; ``git commit -a -m "a message"``; ``git push``)
351341

@@ -359,7 +349,7 @@ I'm sure this seems like a lot, but it will get to be a habit, Here are the step
359349

360350
Is that so bad?
361351

362-
Remember: this seems like a lot -- but it *does* reflect he real workflow when doing real coding. Even if you work alone, a version control system is a really good idea.
352+
Remember: this seems like a lot -- but it *does* reflect the real workflow when doing real coding. Even if you work alone, a version control system is a really good idea.
363353

364354

365355
General Advice for working with git and gitHub

‎searchindex.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎topics/01-setting_up/github_classroom.html‎

Lines changed: 23 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -270,21 +270,22 @@ <h3>2) Clone the Repo<a class="headerlink" href="#clone-the-repo" title="Permali
270270
<p>(you should be able to type <code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">clone</span></code> and then paste the url you copied from gitHub)</p>
271271
<p>This will create a new directory for the repository, named by the assignment and your gitHub handle – this is where you will put all the work for that assignment.</p>
272272
</div>
273-
<div class="section" id="create-a-develop-branch-for-your-work">
274-
<h3>3) Create a develop branch for your work<a class="headerlink" href="#create-a-develop-branch-for-your-work" title="Permalink to this headline"></a></h3>
275-
<p>Create and check out a new branch for your work.</p>
273+
<div class="section" id="use-the-develop-branch-for-your-work">
274+
<h3>3) Use the develop branch for your work<a class="headerlink" href="#use-the-develop-branch-for-your-work" title="Permalink to this headline"></a></h3>
275+
<p>Check out a different branch for your work.</p>
276276
<ol class="loweralpha simple">
277277
<li><p>Change the working directory to the repo just created by the clone:</p></li>
278278
</ol>
279279
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="n">the_name_of_the_assignment_repo</span>
280280
</pre></div>
281281
</div>
282282
<ol class="loweralpha simple" start="2">
283-
<li><p>Make a new branch:</p></li>
283+
<li><p>Checkout the develop branch</p></li>
284284
</ol>
285-
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">checkout</span> <span class="o">-</span><span class="n">b</span> <span class="n">develop</span>
285+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">checkout</span> <span class="n">develop</span>
286286
</pre></div>
287287
</div>
288+
<p>Note: there should be a “develop” branch already in the repo. If not, you will get an error, but you can create the branch by hand by adding the <code class="docutils literal notranslate"><span class="pre">-b</span></code> flag: <code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">checkout</span> <span class="pre">-b</span> <span class="pre">develop</span></code></p>
288289
<p>After that command, git will be “in” the develop branch – anything you change will only be reflected in that branch.</p>
289290
<div class="admonition note">
290291
<p class="admonition-title">Note</p>
@@ -370,31 +371,24 @@ <h3>5) Push your work to gitHub<a class="headerlink" href="#push-your-work-to-gi
370371
</pre></div>
371372
</div>
372373
<p>Note that I am on the “develop” branch, which is what’s wanted, and nothing new to commit – all my changes have been committed – it’s time to push.</p>
373-
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ git push
374-
fatal: The current branch develop has no upstream branch.
375-
To push the current branch and set the remote as upstream, use
376-
377-
git push --set-upstream origin develop
378-
</pre></div>
379-
</div>
380-
<p>Hmm – “fatal” – I don’t like the look of that! But it’s pretty simple, really. git is telling you that it doesn’t know where to push the code to – your gitHub version of the repo doesn’t have a develop branch. But it tells you want to do to create that branch on gitHub (origin), so do that:</p>
381-
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ git push --set-upstream origin develop
382-
Enumerating objects: 4, done.
383-
Counting objects: 100% (4/4), done.
374+
<dl class="simple">
375+
<dt>::</dt><dd><p>$ git push
376+
Enumerating objects: 5, done.
377+
Counting objects: 100% (5/5), done.
384378
Delta compression using up to 4 threads
385379
Compressing objects: 100% (3/3), done.
386-
Writing objects: 100% (3/3), 639 bytes | 319.00 KiB/s, done.
387-
Total 3 (delta 0), reused 0 (delta 0)
388-
remote:
389-
remote: Create a pull request for &#39;develop&#39; on gitHub by visiting:
390-
remote: https://github.com/UWPCE-Py310-Fall2020/initial-setup-PythonCHB/pull/new/develop
391-
remote:
392-
To https://github.com/UWPCE-Py310-Fall2020/initial-setup-PythonCHB.git
393-
* [new branch] develop -&gt; develop
394-
Branch &#39;develop&#39; set up to track remote branch &#39;develop&#39; from &#39;origin&#39;.
395-
</pre></div>
380+
Writing objects: 100% (3/3), 354 bytes | 354.00 KiB/s, done.
381+
Total 3 (delta 1), reused 0 (delta 0)
382+
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
383+
To <a class="reference external" href="https://github.com/UWPCE-Py310-Fall2020/fizz-buzz-PythonCHB.git">https://github.com/UWPCE-Py310-Fall2020/fizz-buzz-PythonCHB.git</a>
384+
46d868a..fe3e479 develop -&gt; develop</p>
385+
</dd>
386+
</dl>
387+
<div class="admonition note">
388+
<p class="admonition-title">Note</p>
389+
<p>If you don’t have a develop branch up on gitHUb, you will get a “fatal” Error. Scary, but it’s pretty simple, really. git is telling you that it doesn’t know where to push the code to – your gitHub version of the repo doesn’t have a develop branch. But it tells you want to do to create that branch on gitHub (origin), so do that: <code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">push</span> <span class="pre">--set-upstream</span> <span class="pre">origin</span> <span class="pre">develop</span></code> – and you should be good to go.</p>
396390
</div>
397-
<p>Good – now the local develop branch is hooked up to a develop branch on gitHub. And it even tells you what to do next – see the “Create a pull request for ‘develop’ on gitHub by visiting:” – that’s exactly what you need to do!</p>
391+
<p>Now the local develop branch is hooked up to a develop branch on gitHub.</p>
398392
</div>
399393
<div class="section" id="complete-the-assignment">
400394
<h3>6) Complete the Assignment<a class="headerlink" href="#complete-the-assignment" title="Permalink to this headline"></a></h3>
@@ -464,7 +458,7 @@ <h3>16) Want to improve it after it’s been accepted?<a class="headerlink" href
464458
<div><ol class="arabic simple">
465459
<li><p>Accept the assignment from the gitHub classroom link</p></li>
466460
<li><p>Clone the resulting repo onto your work machine (<code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">clone</span></code>)</p></li>
467-
<li><p>Make a develop branch (<code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">checkout</span> <span class="pre">-b</span> <span class="pre">develop</span></code>)</p></li>
461+
<li><p>Switch to the develop branch (<code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">checkout</span> <span class="pre">develop</span></code>)</p></li>
468462
<li><p>Do the assignment in the develop branch, committing and pushing as you go. (<code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">add</span></code>; <code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">commit</span> <span class="pre">-a</span> <span class="pre">-m</span> <span class="pre">&quot;a</span> <span class="pre">message&quot;</span></code>; <code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">push</span></code>)</p></li>
469463
<li><p>When complete or when you would like some help, make a PR on gitHub, and post a link to the PR in the LMS (Canvas or EdX)</p></li>
470464
<li><p>Read and respond to the comments on gitHub from your instructors</p></li>
@@ -473,7 +467,7 @@ <h3>16) Want to improve it after it’s been accepted?<a class="headerlink" href
473467
</ol>
474468
</div></blockquote>
475469
<p>Is that so bad?</p>
476-
<p>Remember: this seems like a lot – but it <em>does</em> reflect he real workflow when doing real coding. Even if you work alone, a version control system is a really good idea.</p>
470+
<p>Remember: this seems like a lot – but it <em>does</em> reflect the real workflow when doing real coding. Even if you work alone, a version control system is a really good idea.</p>
477471
</div>
478472
<div class="section" id="general-advice-for-working-with-git-and-github">
479473
<h2>General Advice for working with git and gitHub<a class="headerlink" href="#general-advice-for-working-with-git-and-github" title="Permalink to this headline"></a></h2>

0 commit comments

Comments
 (0)