Hey all,
I thought I'd provide a little overview of the usual GitHub open
source collaboration process. It's a little different that the usual
svn, everyone gets a permission bit style, but it's actually a lot
easier and a lot more fun once you get started.
The best way to collaborate on stuff in GitHub is actually through
forking. Where forking was a big scary word in subversion that meant
the possible fracturing of a project, in git, it's the easiest way for
people to add significant features to your project without getting in
each others' way. Everyone gets their own repo for the project and git
(with the assistance of GitHub) makes it incredibly easy to send and
receive changes between repos.
Here's the standard git/Github workflow for collaborating on open
source. Let's say I had a feature I wanted to add to to todo.txt, for
example some deep git integration that would automatically provide
some of the magical "flashbake" features Gina and Cory Doctorow were
talking about on TWIT. Here are the steps I would follow:
1) Go to Gina's repo on GitHub and click the fork button.
http://skitch.com/atduskgreg/b8rkw/ginatrapani-s-todo.txt-cli-at-master-github
2) GitHub will create a personal copy of the repo for me to work with
and provide me with info for cloning it.
http://skitch.com/atduskgreg/b8rmn/atduskgreg-s-todo.txt-cli-at-master-github
3) I go to the terminal and run the git clone command to get a local
copy of my fork of the project.
4) I make my changes, working as normally, committing, branching, and
pushing as I see fit.
5) Once I'm done with my feature and I want Gina to pull my code up
into her branch so that everyone who's checking out the project can
see it, I issue a "pull request" on Github. This notifies Gina (and
anyone else who has a fork of the project) that I've got code I'd like
her to pull.
http://skitch.com/atduskgreg/b8rce/atduskgreg-s-todo.txt-cli-at-master-github
6) Gina gets the pull request. She can then browse my changes and
decide if she wants to apply them. If so, she has two options: she can
add me as a remote from the command line and pull my changes into a
branch there to do the merge. Or, easier and more fun, she can use the
GitHub Fork Queue feature to merge the features in directly via the
web interface with just a few clicks:
http://skitch.com/atduskgreg/b8rcc/the-todo.txt-cli-fork-queue-github
7) Gina notifies people of the new changes to the project via GitHub
messages, the GitHub activity feed, emails to the mailing list (which
can be automated from GitHub), etc. All the other downstream repos
pull from Gina to get the new changes and the virtuous cycle continues.
It is also possible to add people as contributors to an individual
repo. That's mostly useful if you have core committers who you want to
be able to make emergency fixes to a repo without your intervention. I
use this on client projects where things are moving really fast and
furious and on my Ruby Arduino project http://github.com/atduskgreg/rad/tree
because my two main collaborators are so much smarter than me that
they often bugs that I can barely understand!
But for the normal day-to-day open source flow of patches this branch
and merge workflow is really the easiest. Anyone can get started
adding features or fixing bugs without the maintainer having to do any
setup, it's really easy to pull in changes at will when you're ready,
and it lets people keep their own private versions with small
improvements that the core repo isn't ready to pull in yet. This
workflow (especially with how easy and fun GitHub makes it) is the why
git is the killer app that is sweeping the nation.
Let me know if you have any questions, I'd be glad to answer them and
help anyone get started as best I can!
yours,
Greg
---
http://github.com/atduskgreg
http://urbanhonking.com/ideasfordozens
http://atduskmusic.com
On Mar 6, 2009, at 9:07 AM, Gina Trapani wrote:
> On Fri, Mar 6, 2009 at 6:15 AM, Philippe Teuwen <phil-
> yahoo@...> wrote:
>> But this requires a bit of discipline from us and guidance from you:
>> Do you want people to push stuffs only in a specific branch from
>> which you
>> "cherry-pick" what you want and integrate it in the main trunk
>> (master)? Or
>> do you want us to follow another model?
>
> Good question. Like I said, I haven't done this before, but this
> sounds like a reasonable plan, collaborators pushing to a separate
> branch and then I'll merge into the master. Git folks, is there a
> different/better way to go about this?
>
>> I'll send you my SSH public key privately, I guess this is all you
>> need.
>
> Looks like all I need is your GitHub user name, so anyone else who
> wants in, send that to me either on-list or privately.
>
> Thanks!
>
>
>
>
> --
> http://ginatrapani.org
>
>
> ------------------------------------
>
> http://todotxt.comYahoo! Groups Links
>
>
>