litany against fear

coding with spice ¤ by nick quaranto

Contributing to Insoshi with Git and GitHub Notes

published 20 Nov 2008

Part of my series of notes from the Professional Ruby Conference. See them all here.

This is a talk by Michael Hartl who runs Insoshi.

Michael wrote Railspace and was part of Y Combinator and built insoshi out of those experiences. It’s a developer run social network. They got onto GitHub during their beta and it’s really helped them out.

Another huge project on GitHub is Rails. Explaining the basics of Git and collaboration. Pushing to repositories, and most importantly: pulling down changes from cloned copies of the source.

Going over a few features of Insoshi. One such feature is common contacts, which should be as simple as Person.common_contacts_with(@other_person). Contributors submit code constantly that isn’t tested and somewhat messy, so it helps to clean it up. We’re going to go through the process of cleaning it up since there’s various problems from functionality to database vendor problems.

Showing off GitHub and forking a repository. Forking a repo…it’s absolutely the same! They have 2 branches: master (stable) and edge (slightly less stable). Forks can maintain separate branches too. They have a custom script that pulls down changes and creating a separate branch for your own changes.

Now that we have a forked repo and it’s updated. So let’s change the code write a test for our new functionality FIRST. Wrote a failing test and going to fix it in the code. Used the & operator to find the intersect between two arrays: person’s contacts and other person’s contacts.

Showing the git commit and push commands and the diff up on GitHub. The pull request feature on GitHub lets you make the project maintainers aware that you’ve made changes and lets them bring in your work. From there it’s out of your hands, but they will be notified.



code (2) gaming (3) git (9) internet (5) prorubyconf (25) railsconf (17) ruby (10) windows (3)