-
Notifications
You must be signed in to change notification settings - Fork 5
/
workflow.html
141 lines (110 loc) · 7.44 KB
/
workflow.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Github Workflow</title>
<link rel="stylesheet" href="stylesheets/styles.css">
<link rel="stylesheet" href="stylesheets/pygment_trac.css">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div class="wrapper">
<h1>Git Workflow - Projects</h1>
<h2>Github Account</h2>
By now you should have done these things:<p>
<ol>
<li>Signed up for an account on Github </li>
<li>Requested and received educational status with Github </li>
<li>Sent me your Github user name </li>
<li>Accepted my invitation to join the <tt>folchcourses</tt> Github organization </li>
</ol>
If you have not done all of these, <a href="new_account.html" target="_blank" >follow the steps here</a>.
<p>
<h2>"Forking" your personal (private) course repository</h2>
In what follows we will be using the example of a student named
<tt>Joe Johnson</tt>, with the Github user name of <tt>geonole</tt>. You
should replace this with your GitHub user name in the steps that
follow.<p>
<ol>
<li>Login to Github</li>
<li>Click your user name in the upper-right corner. <a href="images/wf_step2.png" >example</a></li>
<li>Click the <tt>folchcourses</tt> icon in the lower-left corner. <a href="images/wf_step3.png" >example</a></li>
<li>Click the repository with your name (there will be a code for course, semester and year). <a href="images/wf_step4.png" >example</a></li>
<li>Click "Fork" in the upper-right corner to put a copy of the repository under your user name. <a href="images/wf_step5.png" >example</a></li>
<li>When prompted <tt>Where should we fork this repository?</tt> select your individual GitHub account <a href="images/wf_step6.png" >example</a></li>
<li>When GitHub is finished creating the fork, you will be relocated to the copy that resides on your individual GitHub account <a href="images/wf_step7.png" >example</a></li>
</ol>
<h2>Making changes in your repository</h2>
You will now start working on your forked repository.<p><p>
If this is your first time using GitHub just use the GitHub online
editor. Once you have completed all the steps (including the "pull
request" in the next section), come back here to start working on your
local hard drive. <p>
<h3>Using the GitHub online editor</h3>
<ol>
<li>If you're not on the <a href="images/wf_landing.png" >landing page</a> for your repository: log in, click your user name in the upper-right, click the <tt>Repositories</tt> tab in the middle and click the name of your personal course repository. </li>
<li>Click the link <tt>README.md</tt>. <a href="images/wf_step_b2.png" >example</a></li>
<li>Click the <tt>Edit</tt> button, which brings up the contents of the file in an editor pane. <a href="images/wf_step_b3.png" >example</a></li>
<li>Make some changes. <a href="images/wf_step_b4.png" >example</a></li>
<li>Click <tt>Commit Changes</tt> in the lower-right. <a href="images/wf_step_b5.png" >example</a></li>
</ol>
Congratulations, you have made your first commit on GitHub!<p>
<h3>Setting up your local hard drive</h3>
Typically you will create and edit files directly on your local hard
drive. These files can be pulled from or pushed to the GitHub cloud
using a graphical user interface (GUI).
<ul>
<li><a href="https://mac.github.com/" >Mac</a></li>
<li><a href="https://windows.github.com/" >Windows</a></li>
</ul>
Follow these steps to get started with the GUI (only the first time you use it).
<ol>
<li>Download the appropriate software for your computer, and install it.</li>
<li>Startup the GUI, and follow the steps to link your GitHub account to the GUI.</li>
<li>"Clone" the fork of your personal repository (the one located
under your user name, not the folchcourses name) to your local hard drive.</li>
</ol>
<h3>Follow these steps for day-to-day work</h3>
<ol>
<li>Create or edit file(s) in the repository on your hard drive (you're not using the GUI for this).</li>
<li>Using the GUI, "add" all the changes you've made.</li>
<li>Using the GUI, "commit" all the changes you've made.</li>
<li>Using the GUI, "push" the commit to your repository on the GitHub cloud.</li>
</ol>
Note: If you are not able to push content to your personal repository it
might be because you cloned the folchcourses version and not your
personal fork of it.
<h2>Issuing a "Pull Request"</h2>
At this point the edits are only in the fork of your student repository,
whether you used the online editor or pushed files from your local hard drive.
Let's say you are ready to submit the changes to me for grading or review.
This is done using a "pull request." Basically this tells me that you are
ready to have me look at the changes from your fork by merging those changes
into the repository on the organizational account.<p>
<ol>
<li>On your <a href="images/wf_landing.png" >landing page</a> for the fork on your personal GitHub page select the Pull Request button on the right. <a href="images/wf_step_c1.png" >example</a></li>
<li>In the next page, click the <tt>New pull request</tt> button on the upper-right. <a href="images/wf_step_c2.png" >example</a> This will bring up a new page showing the changes that you previously made and which would be incorporated into this pull request. <a href="images/wf_step_c2b.png" >example</a> </li>
<li>Click the green <tt>Create pull request</tt> button located on the left. <a href="images/wf_step_c3.png" >example</a> </li>
<li>Replace <tt>Update README.md</tt> in the text field with something more descriptive like <tt>minor edits while learning github</tt>. <a href="images/wf_step_c4.png" >example</a> </li>
<li>Click the green <tt>Create pull request</tt> button located on the right. <a href="images/wf_step_c5.png" >example</a> </li>
<li>This moves you over to your student repository on the organizational account where you can see the pending pull request. <a href="images/wf_step_c6.png" >example</a> </li>
</ol>
You are done with the pull request at this point. I will receive a
notification that tells me you have a pull request submitted that I need to
look at. On my side I will examine it, grade it if it is an assignment, leave
feedback and then do one of two things. If the assignment is finished I will
"merge" the pull request. If it needs some changes I will send you a note
telling you what needs to be changed. You can make changes and they will be
added to the pull request automatically.<p>
<p>Once the pull request is good for the merge I will merge it. The result will
be an update to your student account on the course organizational page. On
your personal GitHub page you will see that it was merged. <a href="images/wf_step_c7.png" >example</a>
<p><small>Hosted on GitHub Pages — Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
</div>
<script src="javascripts/scale.fix.js"></script>
</body>
</html>