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
<li><ahref="http://code52.uservoice.com">submit an idea</a></li>
24
+
25
+
<li><ahref="#">past ideas</a></li>
26
+
<li><ahref="#">wall of champions</a></li>
27
+
28
+
29
+
</ul>
30
+
</div>
31
+
32
+
</div>
33
+
<divid="content">
34
+
<divclass="entry-container">
35
+
<divclass='entry'>
36
+
<h1> Contributing to Code52 projects </h1>
37
+
<spanclass="postdate"> 7 January, 2012
38
+
39
+
</span>
40
+
<h2>How do I contribute?</h2>
41
+
42
+
<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>
43
+
44
+
<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>
45
+
46
+
<h3>Step 1: Fork or branch the repo</h3>
47
+
48
+
<p><imgsrc="img/githubflow_1.png" alt="" /></p>
49
+
50
+
<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>
51
+
52
+
<p>If you do have write access to the repo, just skip to step 2.</p>
53
+
54
+
<p><imgsrc="img/githubflow_2.png" alt="" /></p>
55
+
56
+
<h3>Step 2: Pick and issue, any issue. Be an issue!</h3>
57
+
58
+
<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>
59
+
60
+
<p><imgsrc="img/githubflow_3.png" alt="" /></p>
61
+
62
+
<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>
63
+
64
+
<h3>Step 3: Create a branch and make some changes</h3>
65
+
66
+
<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>
67
+
68
+
<blockquote><p>#1 - I added more awesome in</p></blockquote>
69
+
70
+
<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>
71
+
72
+
<p><imgsrc="img/githubflow_4.png" alt="" /></p>
73
+
74
+
<p>To create branches in git,</p>
75
+
76
+
<pre><code>git branch MyBranchName
77
+
git checkout MyBranchName
78
+
</code></pre>
79
+
80
+
<h3>Step 4: Send a pull request</h3>
81
+
82
+
<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>
83
+
84
+
<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>
85
+
86
+
<p>The pull request button is next to the fork button, up the top of a project.</p>
87
+
88
+
<p><imgsrc="img/githubflow_5.png" alt="" /></p>
89
+
90
+
<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>
91
+
92
+
<p><imgsrc="img/githubflow_6.png" alt="" /></p>
93
+
94
+
<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>
0 commit comments