You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7288023
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: source/topics/01-setting_up/github_classroom.rst
+20-30Lines changed: 20 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,22 +115,24 @@ d) Clone the repo
115
115
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.
116
116
117
117
118
-
3) Create a develop branch for your work
119
-
----------------------------------------
118
+
3) Use the develop branch for your work
119
+
---------------------------------------
120
120
121
-
Create and check out a new branch for your work.
121
+
Check out a different branch for your work.
122
122
123
123
a) Change the working directory to the repo just created by the clone:
124
124
125
125
::
126
126
127
127
cd the_name_of_the_assignment_repo
128
128
129
-
b) Make a new branch:
129
+
b) Checkout the develop branch
130
130
131
131
::
132
132
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``
134
136
135
137
After that command, git will be "in" the develop branch -- anything you change will only be reflected in that branch.
136
138
@@ -225,33 +227,21 @@ In order to get your changes up to gitHub you need to "push" them. It's always a
225
227
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.
226
228
227
229
::
228
-
229
230
$ 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
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
234
240
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.
236
242
237
-
::
243
+
Now the local develop branch is hooked up to a develop branch on gitHub.
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!
255
245
256
246
6) Complete the Assignment
257
247
--------------------------
@@ -345,7 +335,7 @@ I'm sure this seems like a lot, but it will get to be a habit, Here are the step
345
335
346
336
2) Clone the resulting repo onto your work machine (``git clone``)
347
337
348
-
3) Make a develop branch (``git checkout -b develop``)
338
+
3) Switch to the develop branch (``git checkout develop``)
349
339
350
340
4) Do the assignment in the develop branch, committing and pushing as you go. (``git add``; ``git commit -a -m "a message"``; ``git push``)
351
341
@@ -359,7 +349,7 @@ I'm sure this seems like a lot, but it will get to be a habit, Here are the step
359
349
360
350
Is that so bad?
361
351
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.
0 commit comments