Thursday, July 16, 2009

Scott Chacon at Ruby Kaigi- Using git and github to develop one million times faster

First presentation of the day by Scott Chacon was given in English and translated into Japanese.

Pro Git book- now at progit.org

Advantages to a DVCS

In git:
Everything is fast
Every clone is a backup
Works offline

Linux kernel was the first project to use it

Immutable, almost never removes data

Stores snapshots, not patches
Sees a commit as a full file version

Commit object is the meta data of the commit
Has a pointer to the parent

Branches- pointers to a commit

Automatically detects merge base

Object model- Branch- commits, trees, blobs

git saves the individual time because no network is needed for:
Diff calculation
file history
merging
branching
committing
etc.

Git allows for frictionless context switching, so you can try out new ideas and develop non-linearly.

Branching can be used as a patch queue system similar to "Quilt" or mercruial's "mq"

useful rebase commands-
Rebase –onto
Rebase –i

Git saves a team time because of the variety of workflows possible:
Centralized model
Integration Manager model- Sort of like github, don’t need to wait for maintainer to apply changes
Dictator/lieutenant model
Non-linear team model

It also saves time because:
Parallel development in separate repositories is possible

There is no necessary single point of failure
(You can push to a temporary repo if something goes wrong with the main repo)

Github purpose:
Share code, submit and accept patches, find projects

75% of forked projects have work contributed back

18000 projects with at least one watcher
25% of those have been contributed to.

Make it easy to put code online

Gitsourcing- take some generic code used at your company and put it online
Grit- 13 contributers, 41 commits, 1047 LOC
Jekyll- Cont 28, 1475 LOC, Commits 79
Github services andjavascript:void(0) gems- also open source

Q & A:

Why did you create git hub?
Git hosting was a pain in the ass.

Sometimes git acts weird on windows. Suggestions?
Git extensions, Tortoisegit, EGit for Eclipse

Git on Cygwin a good solution?
Some people don’t like cygwin.

(Handed out some github stickers)

Submodules?
“I don’t use submodules” “There are a lot of problems” “I use git subtree merging” “40 lines of Rake”
progit.org describes subtree/submodules

When do you merge and when do you rebase?
Rebase- Topic branches, back to the main branch
Merge- Get changes from other people
Rebase- Git-svn, use all the time

No comments:

Post a Comment