forked from Code52/code52.github.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontributing.html
More file actions
110 lines (77 loc) · 5.37 KB
/
Copy pathcontributing.html
File metadata and controls
110 lines (77 loc) · 5.37 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="en-au" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<link href="/rss.xml" type="application/rss+xml" rel="alternate" title="Blog Feed" />
<link href="/atom.xml" type="application/atom+xml" rel="alternate" title="Blog Feed" />
<link href="/projectsrss.xml" type="application/rss+xml" rel="alternate" title="Projects Feed" />
<link href="/projectsatom.xml" type="application/atom+xml" rel="alternate" title="Projects Feed" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<title>Contributing to Code52 projects - code52</title>
<link rel="stylesheet" type="text/css" href="/css/style.css" />
<link rel="shortcut icon" href="/img/favicon.ico" />
</head>
<body>
<div id="container">
<div id="side">
<a href="/" id="home" title="home" alt="home"><img src="/img/logo.png" alt="Code 52 - a new coding project every week" /></a>
<div id="hometext"><a href="/" >code52</a></div>
<div class="section">
<ul>
<li><a href="/about.html">about</a></li>
<li><a href="http://talk.code52.org/">discussion</a></li>
<li><a href="http://twitter.com/code_52">twitter</a></li>
<li><a href="http://jabbr.net/#/rooms/code52">jabbr</a></li>
<li><a href="http://code52.uservoice.com">uservoice</a></li>
<li><a href="/contributing.html">contributing</a></li>
<li><a href="/projects.html">previous projects</a></li>
</ul>
</div>
</div>
<div id="content">
<div class="entry-container">
<div class='entry'>
<h1> Contributing to Code52 projects </h1>
<span class="postdate">
</span>
<h2>How do I contribute?</h2>
<p>For the Code52 projects, we're adopting what is often referred to as "GitHub Flow". This doesn't exclusively apply to GitHub or even Git, but this is the example we're giving.</p>
<blockquote><p>Note, this is different to "Git Flow", and although many of the principles are the same, it's much much simplier.</p></blockquote>
<h3>Step 1: Fork or branch the repo</h3>
<p><img src="img/githubflow_1.png" alt="" /></p>
<p>At the top of every GitHub project is the magical fork button. If you don't have access to the repo, fork it to copy it over to your account. Once you fork it, you have full administrative privledges over your fork, so you can commit away.</p>
<p>If you do have write access to the repo, just skip to step 2.</p>
<p><img src="img/githubflow_2.png" alt="" /></p>
<h3>Step 2: Pick and issue, any issue. Be an issue!</h3>
<p>Normally you'd easily be able to make a fork, branch and commit up changes, but in Code52 projects we're moving very quickly and can quickly pick up people. It's a good idea to 'stake your claim' on a bug or feature to fix up so that two people aren't working on the same thing.</p>
<p><img src="img/githubflow_3.png" alt="" /></p>
<p>Go over to the original projects issue tab, and pick something that you'd like to work on. Don't see it there? Create an issue. If you can, assign the issue to yourself or leave a comment on the issue saying "I'll do this" - it needs to be explicitly stated, as just reporting an issue (be it a bug or feature) doesn't really let people know what you're doing.</p>
<h3>Step 3: Create a branch and make some changes</h3>
<p>Create a somewhat descriptive branch name on <em>your</em> fork, switch to it, make some changes. A descriptive name helps let us know what you are working on. Better yet, if an issue is created you can reference it <em>in your commit notes</em> by having "#IssueNumber" - ie,</p>
<blockquote><p>#1 - I added more awesome in</p></blockquote>
<p>If you do that, GitHub automatically creates a note in the issue tracker that you've referenced the issue, right down to the specific commit!</p>
<p><img src="img/githubflow_4.png" alt="" /></p>
<p>To create branches in git,</p>
<pre><code>git branch MyBranchName
git checkout MyBranchName
</code></pre>
<h3>Step 4: Send a pull request</h3>
<p>It doesn't matter whether you've got full access to a repo or forked and have your own branch - you can pull request from your fork or from your branch back into the <code>master</code> branch. Even if you're the project "owner/maintainer", if there are others on the project, send a pull request and let somebody else accept/review it.</p>
<p>Why a pull request? One, that gives the project maintainer notification that something has been done, and two, GitHub's pull request interface is a fantastic way to do code reviews.</p>
<p>The pull request button is next to the fork button, up the top of a project.</p>
<p><img src="img/githubflow_5.png" alt="" /></p>
<p>Neat so far, right? It gets better. The pull request will notify the project maintainers, and present them with an <em>awesome</em> magical button.</p>
<p><img src="img/githubflow_6.png" alt="" /></p>
<p>Oh sure, there is extra information about the pull request - such as all the commits involved and full discussion capabilities, but at the end of hte day, the auto-merge button makes pull requests and GitHub flow <em>trivial</em> to do.</p>
</div>
</div>
<div id="page-navigation">
<div class="left"> </div>
<div class="right"> </div>
<div class="clear"> </div>
</div>
</div>
</div>
</body>
</html>