-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathhw-git.html
More file actions
203 lines (203 loc) · 10.7 KB
/
Copy pathhw-git.html
File metadata and controls
203 lines (203 loc) · 10.7 KB
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>SLP: git/github Homework</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
/* The extra [class] is a hack that increases specificity enough to
override a similar rule in reveal.js */
ul.task-list[class]{list-style: none;}
ul.task-list li input[type="checkbox"] {
font-size: inherit;
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
</style>
<link rel="stylesheet" href="../markdown.css" />
</head>
<body>
<main>
<h1 id="slp-gitgithub-homework">SLP: git/github Homework</h1>
<p><a href="index.html">Go up to the main SLP documents page</a> (<a
href="index.md">md</a>)</p>
<h3 id="introduction">Introduction</h3>
<p>This assignment is meant to get everybody up to speed on using git
and github. You should read the <a href="git-intro.html">Introduction to
git and github</a> (<a href="git-intro.md">md</a>) first.</p>
<h3 id="github.com">github.com</h3>
<p>First, create an account on <a
href="https://github.com">github.com</a> if you do not already have one.
You should then <a href="https://education.github.com/">request an
educational discount</a> – this will allow you to have a number of
private repositories (5, in fact). Approval of the student discount may
take some time. If you wait until the last minute, and do not get the
discount in time, then you will have to purchase private repositories.
Thus, please start this part early.</p>
<p>For this assignment, you will need to create a
<strong>private</strong> repository named <code>cs4970-git-hw</code>. It
<strong>MUST</strong> be named this, or else we will not be able to find
it, and we will assume that you did not complete the assignment. There
will be only one private repository needed in this assignment. The
actual location of your repository will be:
http://github.com/username/cs4970-git-hw (where “username” is your
github username). As mentioned in the course syllabus, if you do not
have any private repositories available, you will have to purchase
more.</p>
<p>Within that repo, you will need to complete each of the following
sections for this assignment. Note that you may need to enable the wiki
and issue sections: from the main repo page, click on Settings (in the
right-hand column), and under Features you can enable wikis and
issues.</p>
<h3 id="allow-us-to-view-the-repo">Allow us to view the repo</h3>
<p>The course instructor(s) and any graduate TA(s) need to be able to
view the private repos that you create. From the main repo page, click
on Settings (in the right-hand column), click on Collaborators (in the
left-hand column), and enter our github usernames. You can find the
appropriate github usernames in the <a
href="../uva/daily-announcements.html#/">daily announcements slide</a>
set.</p>
<p>However, please <strong><em>ADD US AFTER YOU HAVE FINISHED THE
HOMEWORK</em></strong>. This prevents us from getting notifications
every time you make any change to your repo (edit a wiki page, add an
issue, etc.). We are going to get really cranky – and take points off! –
if we get a dozen emails from every person’s repo as they are working
through this homework. Since there are many students in the class,
that’s well over 1,000 github emails that we would rather not have to
deal with.</p>
<h3 id="update-your-profile-picture">Update your profile picture</h3>
<p>The default profile pictures are just patterns. Make yours
interesting! You can change your profile picture pretty easily. From
your main profile page (https://github.com/username), click on “Edit
Profile”, then “Upload new picture”. If you have already changed your
picture away from the default, then ignore this step. And you don’t
<strong>have</strong> to do this. But all the <em>cool</em> people are
doing it…</p>
<h3 id="wiki">Wiki</h3>
<p>Create a bunch of wiki pages. Some of them must link to other pages.
And use a reasonable amount of Markdown to format your pages. We don’t
care about the content – we care that you know how to use the wiki, you
know how to create and link to pages, and you know how to use Markdown.
You should have both internal links (to other wiki pages in that repo)
as well as external links (to other URLs).</p>
<p>You should create at least one table. So that we can easily find your
markdown’ed code, we are just going to look on the main wiki page to see
your prowess at markdown – we will only check the other pages to ensure
you know how to link from one page to another.</p>
<h3 id="issues">Issues</h3>
<ul>
<li>Create a bunch of issues; we don’t care what their content is.
Entertain us, but be appropriate, please. Use Markdown in them for
formatting. Because we don’t want to look at <em>all</em> of your issues
to find the one that shows that you can use Markdown, you should use
Markdown in <em>all</em> of them. You can create some Markdown text and
cut-and-paste that into the other issues for this.</li>
<li>Create some new labels. Label a bunch of issues with different
labels.</li>
<li>Create a milestone. Make some (but not all!) of your issues part of
that milestone.</li>
<li><a
href="https://help.github.com/articles/closing-issues-using-keywords/">Resolve
an issue via a commit message</a>. So that we can find the issue that
you have resolved this way, let’s say you will resolve issues #10 and
#12 this way. This means we will be looking at
https://github.com/username/cs4970-git-hw/issues/10 and
https://github.com/username/cs4970-git-hw/issues/12 to find these
issues.</li>
</ul>
<h3 id="forks-and-pull-requests">Forks and pull requests</h3>
<p>You should do a fork of the <code>uva-slp/git-hw-to-fork</code>
repository that was set up for this assignment (<a
href="https://github.com/uva-slp/git-hw-to-fork">https://github.com/uva-slp/git-hw-to-fork</a>).
You can do this by clicking on the “Fork” button on the upper-right when
viewing that page. Clone your forked repo, and make some change. Make
sure that this change involves just some addition – if you everybody
edits an existing file, then we have to deal with merging 100+ different
edits to the same file, and we have better things to do. So your change
can be anything, but please keep it appropriate, as this is a public
repo (and your forked repo can also be a public repo). Entertain us!</p>
<p>Once you have made your change, commit and push. You should then
submit that change as a pull request; see <a
href="https://help.github.com/articles/creating-a-pull-request">here</a>
for details.</p>
<p>This is the only section that uses the <code>git-hw-to-fork</code>
repo; all other sections use the <code>cs4970-git-hw</code> repo.</p>
<h3 id="branches-and-merging">Branches and merging</h3>
<p>Git provides a visual graph of the branches of a repo via the network
tool – it’s found off of the Insights link (which is on the right side
of the main github repo page) then the Graphs link from the Insights
menu. Alternatively, you can find it at
https://github.com/username/repo/network.</p>
<p>Do the branching and merging required to make the network graph look
like the last image on the <a
href="http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging">git
branching and merging page</a> that you read in the <a
href="git-intro.html">git intro</a> (<a href="git-intro.md">md</a>).
That image can be found <a
href="http://git-scm.com/figures/18333fig0317-tn.png">here</a>. Hint:
that page describes the commands (and their order) necessary to make the
graph look like that. You are welcome to have other commits, of course –
we just want to see that particular structure in there somewhere. You
should then remove all the extra branches (other than master, of course)
once you have created those branches and merges.</p>
<h3 id="complicated-merging">Complicated merging</h3>
<p>In this part, you will need to perform a complicated merge – meaning
one that git cannot automatically perform for you.</p>
<ul>
<li>Pick some file. While it doesn’t matter what it is, it will have to
have a number of lines of text (or source code, or whatever) to
modify.</li>
<li>Create a separate branch, and call it whatever you want</li>
<li>Edit the <strong>same</strong> part of the file in both branches,
committing after each edit. However, the changes must be
<em>different</em> (if you make the <em>same</em> edit in both branches,
there is nothing to merge!)</li>
<li>Merge the branches. git will create a conflict-resolution file,
which you <strong>MUST</strong> copy (and commit) as conflict.merge.txt
so that we can see it. Fix the conflicts (however you would like), and
finish the merge of those branches.</li>
<li>Delete any extra branches other than master.</li>
</ul>
<p>We will be looking at
https://github.com/username/cs4970-git-hw/blob/master/conflict.merge.txt
to see the file; if that URL doesn’t work (replacing ‘username’ with
your github username), then you will not receive credit for this
part.</p>
<h3 id="finishing-up">Finishing up</h3>
<p>Now that the homework is done, please don’t forget to add us as
collaborators! See above for details.</p>
<h3 id="grading">Grading</h3>
<p>First, the easy ways to get zero credit:</p>
<ul>
<li>Did you create the required <code>cs4970-git-hw</code> repo? If not,
then zero credit</li>
<li>Is the repo private? If not, then zero credit.</li>
<li>Can both the instructor and TA access the repo? If not, then zero
credit.</li>
</ul>
<p>Still with us? Great! We are going to check that you have completed
the various parts described above. Be sure that the conflict.merge.txt
file, from the “complicated merging” section is included.</p>
<p>In particular, we are going to check that those <em>specific</em>
issues (#10 and #12) were resolved via a commit message.</p>
<h3 id="releasing-the-private-repository">Releasing the private
repository</h3>
<p>The <code>cs4970-git-hw</code> repository is private. You will need
to keep this repository around until the assignment is graded. If you
want to request a regrade, then keep it around until the regrading
process has completed. Once you have received the grade, and are either
satisfied with it or have gone through the regrade process, feel free to
remove that repo. Similar rules apply with the
<code>git-hw-to-fork</code> repo, although since that is public, it does
not count against your quota of private repositories.</p>
</main>
</body>
</html>