Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 200 lines (136 sloc) 7.435 kB
e75dfb0 @defunkt the manifesto
authored
1 The GitHub Gem
2 =============
3
4 This gem'll work hand-in-hand with GitHub's API to help you out.
5
e1e3475 @defunkt add in the default / help command and descriptions
authored
6 Catch us in the #github room on freenode if you want to get involved. Or just fork and send a pull request.
abe73e3 @defunkt spice it up
authored
7
112325a @halorgium Update the README to explain how to get started
halorgium authored
8 ===========
9 Getting started
10 ===========
11
f95d5b7 @pjhyett use github gem
pjhyett authored
12 $ gem install defunkt-github -s http://gems.github.com
112325a @halorgium Update the README to explain how to get started
halorgium authored
13
cea4614 @defunkt touch up readme
authored
14 Run it:
3b0eb65 @defunkt simple pull explanation
authored
15
112325a @halorgium Update the README to explain how to get started
halorgium authored
16 $ github <command> <args>
273a1a4 @defunkt Refactored and added Helper helpers.
authored
17
cea4614 @defunkt touch up readme
authored
18
3b0eb65 @defunkt simple pull explanation
authored
19 =============
9e11c44 @mojombo add instruction about fetch and merge of downstream changes to readme
mojombo authored
20 Pulling Upstream Changes
3b0eb65 @defunkt simple pull explanation
authored
21 =============
22
23 Let's say you just forked `github-gem` on GitHub from defunkt.
24
d8d2235 @badcarl Updated README to use correct clone arguments.
badcarl authored
25 $ github clone YOU/github-gem
3b0eb65 @defunkt simple pull explanation
authored
26 $ cd github-gem
27 $ github pull defunkt
28
29 This will setup a remote and branch for defunkt's repository at master.
30 In this case, a 'defunkt/master' branch.
31
1737468 @rmm5t Improved docs on how to pull changes
rmm5t authored
32 If defunkt makes some changes you want, simply `github pull defunkt`. This will
33 leave you in the 'defunkt/master' branch after pulling changes from defunkt's
34 remote. After confirming that defunkt's changes were what you wanted, run `git
35 checkout master` and then `git merge defunkt/master` to merge defunkt's changes
36 into your own master branch. In summary:
3b0eb65 @defunkt simple pull explanation
authored
37
1737468 @rmm5t Improved docs on how to pull changes
rmm5t authored
38 $ github pull defunkt
072de23 @defunkt dropping the bomb
authored
39 $ github checkout master
40 $ github merge defunkt/master
3b0eb65 @defunkt simple pull explanation
authored
41
3708ceb @defunkt explain --merge flag
authored
42 If you've already reviewed defunkt's changes and just want to merge them into your
43 master branch, use the `merge` flag:
44
45 $ github pull --merge defunkt
3b0eb65 @defunkt simple pull explanation
authored
46
9e11c44 @mojombo add instruction about fetch and merge of downstream changes to readme
mojombo authored
47
48 ==========
db3f3d0 @adamv Fixed typo
adamv authored
49 Fetching and Evaluating Downstream Changes
9e11c44 @mojombo add instruction about fetch and merge of downstream changes to readme
mojombo authored
50 ==========
51
52 If you are the maintainer of a project, you will often need to fetch commits
53 from other developers, evaluate and/or test them, then merge them into the
54 project.
55
56 Let's say you are 'defunkt' and 'mojombo' has forked your 'github-gem' repo,
57 made some changes and issues you a pull request for his 'master' branch.
58
59 From the root of the project, you can do:
60
61 $ github fetch mojombo master
62
63 This will leave you in the 'mojombo/master' branch after fetching his commits.
64 Your local 'mojombo/master' branch is now at the exact same place as mojombo's
65 'master' branch. You can now run tests or evaluate the code for awesomeness.
66
67 If mojombo's changes are good, you'll want to merge your 'master' (or another
68 branch) into those changes so you can retest post-integration:
69
072de23 @defunkt dropping the bomb
authored
70 $ github merge master
9e11c44 @mojombo add instruction about fetch and merge of downstream changes to readme
mojombo authored
71
72 Test/analyze again and if everything is ok:
73
072de23 @defunkt dropping the bomb
authored
74 $ github checkout master
75 $ github merge mojombo/master
9e11c44 @mojombo add instruction about fetch and merge of downstream changes to readme
mojombo authored
76
77 The latter command will be a fast-forward merge since you already did the
78 real merge previously.
79
7fa4df9 @schacon added documentation to the README for network stuff
schacon authored
80 ==========
81 Network Patch Queue
82 ==========
83
84 The github gem can also show you all of the commits that exist on any fork of your
85 project (your network) that you don't have in your branch yet. In order to see
86 the list of the projects that have commits you do not, you can run:
87
88 $ github network list
89
90 Which will show you all the forks that have changes. If you want to see what those
91 changes are, you can run:
92
93 $ github network commits
94
95 which will show you something like this:
96
97 9582b9 (jchris/gist) kevin@sb.org Add gist binary 4 months ago
98 c1a6f9 (jchris/gist~1) kevin@sb.org Tweak Rakefile spec tasks to be a bi 4 months ago
99 d3c332 (jchris/gist~2) kevin@sb.org Pull out two helpers into the shared 4 months ago
100 8f65ab (jchris/gist~3) kevin@sb.org Extract command/helper spec assistan 4 months ago
101 389dbf (jchris/gist~4) kevin@sb.org Rename ui_spec to command_spec 4 months ago
102 670a1a (jchris/gist~5) kevin@sb.org Hoist the specs into a per-binary sp 4 months ago
103 6aa18e (jchris/gist~6) kevin@sb.org Hoist commands/helpers into a per-co 4 months ago
104 ee013a (luislavena/master) luislavena@gmail.com Replaced STDOUT by $stdout in specs. 2 weeks ago
105 d543c4 (luislavena/master~3) luislavena@gmail.com Exclude package folder. 8 weeks ago
106 a8c3eb (luislavena/master~5) luislavena@gmail.com Fixed specs for open under Windows. 5 months ago
107 33d003 (riquedafreak/master) enrique.osuna@gmail. Make sure it exists on the remote an 5 weeks ago
108 157155 (riquedafreak/master~1) enrique.osuna@gmail. Updated specs. 5 weeks ago
109 f44e99 (riquedafreak/master~3) enrique.osuna@gmail. Only work with a clean branch. 3 months ago
110
111 These are all the commits that you don't have in your current branch that have been
112 pushed to other forks of your project. If you want to incorporate them, you can use:
113
072de23 @defunkt dropping the bomb
authored
114 $ github cherry-pick ee013a
7fa4df9 @schacon added documentation to the README for network stuff
schacon authored
115
116 for example to apply that single patch to your branch. You can also merge a branch,
117 if you want all the changes introduced in another branch:
118
072de23 @defunkt dropping the bomb
authored
119 $ github merge jchris/gist
7fa4df9 @schacon added documentation to the README for network stuff
schacon authored
120
121 The next time you run the 'github network commits' command, you won't see any of the
122 patches you have cherry-picked or merged (or rebased). If you want to ignore a
123 commit, you can simply run:
124
125 $ github ignore a8c3eb
126
127 Then you won't ever see that commit again. Or, if you want to ignore a range of commits,
128 you can use the normal Git revision selection shorthands - for example, if you want
129 to ignore all 7 jchris/gist commits there, you can run:
130
131 $ github ignore ..jchris/gist
132
133 You can also filter the output, if you want to see some subset. You can filter by project,
134 author and date range, or (one of the cooler things) you can filter by whether the patch
135 applies cleanly to your branch head or not. For instance, I can do this:
136
137 $ ./bin/github network commits --applies
138
139 ca15af (jchris/master~1) jchris@grabb.it fixed github gemspecs broken referen 8 weeks ago
140 ee013a (luislavena/master) luislavena@gmail.com Replaced STDOUT by $stdout in specs. 2 weeks ago
141 157155 (riquedafreak/master~1) enrique.osuna@gmail. Updated specs. 5 weeks ago
142 f44e99 (riquedafreak/master~3) enrique.osuna@gmail. Only work with a clean branch. 3 months ago
143
144 $ ./bin/github network commits --applies --project=riq
145
146 157155 (riquedafreak/master~1) enrique.osuna@gmail. Updated specs. 5 weeks ago
147 f44e99 (riquedafreak/master~3) enrique.osuna@gmail. Only work with a clean branch. 3 months ago
148
149 Pretty freaking sweet. Also, you can supply the --shas option to just get a list of
150 the shas instead of the pretty printout here, so you can pipe that into other
151 scripts (like 'github ignore' for instance).
152
9e11c44 @mojombo add instruction about fetch and merge of downstream changes to readme
mojombo authored
153
3b0eb65 @defunkt simple pull explanation
authored
154 ==========
fd6375a @flavorjones updated README with Issues usage
flavorjones authored
155 Issues
156 ==========
157
158 If you'd like to see a summary of the open issues on your project:
159
160 $ github issues open
161
162 -----
163 Issue #135 (2 votes): Remove Node#collect_namespaces
164 * URL: http://github.com/tenderlove/nokogiri/issues/#issue/135
165 * Opened 3 days ago by tenderlove
166 * Last updated about 1 hour ago
167
168 I think we should remove Node#collect_namespaces. Since namespace names are not unique, I don't know that this method is very useful.
169 -----
170 Issue #51 (0 votes): FFI: support varargs in error/exception callbacks
171 * URL: http://github.com/tenderlove/nokogiri/issues/#issue/51
172 * Opened 4 months ago by flavorjones
173 * Last updated about 1 month ago
174 * Labels: ffi, mdalessio
175
176 we should open JIRA tickets for vararg support in FFI callbacks
177
178 then we should format the libxml error messages properly in the error/exception callbacks
179 -----
180
181 If you want to additionally filter by time:
182
183 $ github issues open --after=2009-09-14
184
185 Or filter by label:
186
187 $ github issues open --label=ffi
188
189 ==========
cea4614 @defunkt touch up readme
authored
190 Contributors
3b0eb65 @defunkt simple pull explanation
authored
191 ==========
cea4614 @defunkt touch up readme
authored
192
e1e3475 @defunkt add in the default / help command and descriptions
authored
193 - defunkt
cea4614 @defunkt touch up readme
authored
194 - maddox
195 - halorgium
c2a0da1 @kballard Add my name to the README contributors list
kballard authored
196 - kballard
9e11c44 @mojombo add instruction about fetch and merge of downstream changes to readme
mojombo authored
197 - mojombo
7fa4df9 @schacon added documentation to the README for network stuff
schacon authored
198 - schacon
199
Something went wrong with that request. Please try again.