Skip to content

Commit 7288023

Browse files
committed
removed creation of develop branch -- it should be there.
1 parent dadc302 commit 7288023

1 file changed

Lines changed: 20 additions & 30 deletions

File tree

‎source/topics/01-setting_up/github_classroom.rst‎

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

0 commit comments

Comments
 (0)