Académique Documents
Professionnel Documents
Culture Documents
al t son Per
on ake
2002 Apr 2005: The BitKeeper Wars Apr 2005: Episode IV - A New Hope July 2005: Hamano is the new maintainer Late 2008: GitHub hits the spotlight
Im an egotistical bastard, and I name all my projects after myself. First Linux, now git. Linus
In other words, I'm right. I'm always right, but sometimes I'm more right than other times. And dammit, when I say "les don't matter", I'm really really Right(tm).
Linus
Strong Points
Non-Linear development Distributed Development Centralized development is a subcase Efciency Toolkit Design
Objects
Git repositories store objects Stored in the Object Database Inside the Git directory .git at the root of your project Four major object types Objects are compressed for storage (zlib) SHA1 of header+content ID
The Blob
Files are stored as blobs Only content, no metadata
The tree
Trees store directories Mode, type, pointer and name Recursive, trees can contain trees Stored as a simple text le
The commit
The object that makes history Pointer to a tree and the parent(s)
commits if any message
The tag
A name for a particular commit Can contain a message Optionally GPG signed Allows for cryptographically secure
releases
Cool.pm
Cool.pm
Makele.PL lib/
Cool.pm
Makele.PL lib/
Cool.pm
Makele.PL lib/
Cool.pm
Makele.PL lib/
Cool.pm
Makele.PL lib/
Makele.PL lib/
Cool.pm
Makele.PL lib/
Makele.PL lib/
Cool.pm
Makele.PL lib/
Makele.PL lib/
Cool.pm
Makele.PL lib/
Makele.PL lib/
Cool.pm
Cool.pm
Makele.PL lib/
Makele.PL lib/
Makele.PL lib/
Cool.pm
Cool.pm
Makele.PL lib/
Makele.PL lib/
Makele.PL lib/
Cool.pm
Cool.pm
Makele.PL lib/
Makele.PL lib/
Makele.PL lib/
Cool.pm
Cool.pm
References
Names for commits Mutable, they point to a specic commit A branch is a reference, a name to a
commit
Name
Makele.PL lib/
Makele.PL lib/
Makele.PL lib/
Cool.pm
Cool.pm
master
HEAD
master
HEAD
master test
HEAD
master
test
HEAD
master
HEAD
test
test
master HEAD
test
master
Merge
test
Merge
master
test
master
Rebase
master
Rebase
test
master
Rebase
test
Rebase + Merge
master test
Rebase + Merge
master test
easy rollback
Content distribution
Updates done in a master, central
repository
Can be automated with hooks Useful if you have lots of static les, faster
than rsync
Read-only lesystem
Design web server that fetch objects
directly from the object database
Wiki/Ticketing backend
Use git repository as storage for wiki or
ticketing systems
Good match for distributed developement Several solutions already available OSS ... but similar to SCM usages
After #codebits
<{mailto,xmpp}:melo@simplicidade.org
About Git
http://git-scm.com/ Git Internals: http://peepcode.com/products/git-internals-pdf Git book: http://progit.org/
About Me
http://simplicidade.org/notes/ @pedromelo {mailto,xmpp}:melo@simplicidade.org skype:melopt http://github.com/melo http://www.slideshare.net/melopt