defunkt / github-gem
- Source
- Commits
- Network (65)
- Issues (11)
- Graphs
-
Tree:
48dc599
github-gem / README
| e75dfb03 » | defunkt | 2008-02-28 | 1 | The GitHub Gem | |
| 2 | ============= | ||||
| 3 | |||||
| 4 | This gem'll work hand-in-hand with GitHub's API to help you out. | ||||
| 5 | |||||
| e1e3475f » | defunkt | 2008-02-29 | 6 | Catch us in the #github room on freenode if you want to get involved. Or just fork and send a pull request. | |
| abe73e3d » | defunkt | 2008-02-28 | 7 | ||
| 112325ad » | halorgium | 2008-03-03 | 8 | =========== | |
| 9 | Getting started | ||||
| 10 | =========== | ||||
| 11 | |||||
| f95d5b7a » | pjhyett | 2008-06-11 | 12 | $ gem install defunkt-github -s http://gems.github.com | |
| 112325ad » | halorgium | 2008-03-03 | 13 | ||
| cea4614f » | defunkt | 2008-03-03 | 14 | Run it: | |
| 3b0eb651 » | defunkt | 2008-03-03 | 15 | ||
| 112325ad » | halorgium | 2008-03-03 | 16 | $ github <command> <args> | |
| 273a1a4e » | defunkt | 2008-02-29 | 17 | ||
| cea4614f » | defunkt | 2008-03-03 | 18 | ||
| 3b0eb651 » | defunkt | 2008-03-03 | 19 | ============= | |
| 9e11c447 » | mojombo | 2008-09-30 | 20 | Pulling Upstream Changes | |
| 3b0eb651 » | defunkt | 2008-03-03 | 21 | ============= | |
| 22 | |||||
| 23 | Let's say you just forked `github-gem` on GitHub from defunkt. | ||||
| 24 | |||||
| d8d22354 » | badcarl | 2008-11-14 | 25 | $ github clone YOU/github-gem | |
| 3b0eb651 » | defunkt | 2008-03-03 | 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 | |||||
| 17374686 » | rmm5t | 2008-03-03 | 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: | ||||
| 3b0eb651 » | defunkt | 2008-03-03 | 37 | ||
| 17374686 » | rmm5t | 2008-03-03 | 38 | $ github pull defunkt | |
| 072de236 » | defunkt | 2008-11-13 | 39 | $ github checkout master | |
| 40 | $ github merge defunkt/master | ||||
| 3b0eb651 » | defunkt | 2008-03-03 | 41 | ||
| 3708ceb2 » | defunkt | 2008-05-02 | 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 | ||||
| 3b0eb651 » | defunkt | 2008-03-03 | 46 | ||
| 9e11c447 » | mojombo | 2008-09-30 | 47 | ||
| 48 | ========== | ||||
| 49 | Fetching and Evaluation Downstream Changes | ||||
| 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 | |||||
| 072de236 » | defunkt | 2008-11-13 | 70 | $ github merge master | |
| 9e11c447 » | mojombo | 2008-09-30 | 71 | ||
| 72 | Test/analyze again and if everything is ok: | ||||
| 73 | |||||
| 072de236 » | defunkt | 2008-11-13 | 74 | $ github checkout master | |
| 75 | $ github merge mojombo/master | ||||
| 9e11c447 » | mojombo | 2008-09-30 | 76 | ||
| 77 | The latter command will be a fast-forward merge since you already did the | ||||
| 78 | real merge previously. | ||||
| 79 | |||||
| 7fa4df95 » | schacon | 2008-11-07 | 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 | |||||
| 072de236 » | defunkt | 2008-11-13 | 114 | $ github cherry-pick ee013a | |
| 7fa4df95 » | schacon | 2008-11-07 | 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 | |||||
| 072de236 » | defunkt | 2008-11-13 | 119 | $ github merge jchris/gist | |
| 7fa4df95 » | schacon | 2008-11-07 | 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 | |||||
| 9e11c447 » | mojombo | 2008-09-30 | 153 | ||
| 3b0eb651 » | defunkt | 2008-03-03 | 154 | ========== | |
| cea4614f » | defunkt | 2008-03-03 | 155 | Contributors | |
| 3b0eb651 » | defunkt | 2008-03-03 | 156 | ========== | |
| cea4614f » | defunkt | 2008-03-03 | 157 | ||
| e1e3475f » | defunkt | 2008-02-29 | 158 | - defunkt | |
| cea4614f » | defunkt | 2008-03-03 | 159 | - maddox | |
| 160 | - halorgium | ||||
| c2a0da17 » | kballard | 2008-05-11 | 161 | - kballard | |
| 9e11c447 » | mojombo | 2008-09-30 | 162 | - mojombo | |
| 7fa4df95 » | schacon | 2008-11-07 | 163 | - schacon | |
| 164 | |||||
