David Martinez pontificating about git

[2:31] <David Martinez> See everything in git is an object inside "objects"
[2:31] <David Martinez> In there there are hash blobs, which are basically gzipped diffs
[2:32] <David Martinez> The hash is a cryptographic hash of the parent hash plus its blob
[2:32] <David Martinez> So the history is perfectly tracked, and one hash always refers to a specific state of the whole tree
[2:32] <David Martinez> Git doesn't track files, it tracks content "diffs", so to speak
[2:32] <jtigg3r> "chunks"?
[2:33] <David Martinez> Yes, so that you can say it's a diff plus attrib changes and whatnot
[2:34] <David Martinez> Then if your project is large or it depends on things in github or somewhere else, you use "submodules"
[2:35] <David Martinez> Those are basically a file with a reference to a hash (checkin) somewhere else, which when you update the submodule will check out exactly that tree elsewhere, resulting in a "git repo inside git repo" on the client repositories
[2:35] <David Martinez> That's more advanced than you need to know right now, but rails plugins are many times installed like that (as rails becomes more and more git friendly)
[2:35] <jtigg3r> got it.
[2:36] <David Martinez> This hashing system is what makes github (the site) possible
[2:36] <jtigg3r> and what exactly does "sharedRepository = true" do to the repo?
[2:36] <David Martinez> Github is "social coding"
[2:36] <jtigg3r> interesting.
[2:36] <David Martinez> Ah, sharedRepository makes sure that when files are written they are made group writable
[2:36] <David Martinez> So when people move tags and whatnot they don't get in trouble with each other.
[2:37] <David Martinez> Check out http://github.com/hackerdude/
[2:37] <David Martinez> That's me
[2:37] <David Martinez> I can follow people and I get notified of their checkins. I can also follow repos and fork them (most of my public repositories are forks of others' repos)
[2:38] <David Martinez> So what I do is I fork the project, use the fork on channels as a git submodule, and then merge things as I see them checked in depending on whether or not I care
[2:38] <David Martinez> If I check in fixes to these repos, the "upline projects" can see what I checked in (I believe), and I can also ask them to "pull from me" to merge the changes back into their development
[2:39] <jtigg3r> interesting
[2:39] <jtigg3r> so a level of indirection
[2:39] <jtigg3r> for each contributor
[2:39] <David Martinez> So the end result of it is that if they don't "accept my patch" I don't have to care. The patches are still public and people who are interested in my fixes can come get them.
[2:39] <David Martinez> They can fork either the original, or mine, or whoever's project has the fixes
[2:39] <jtigg3r> allowing individual projects the ability to control what gets committed into them.
[2:39] <David Martinez> that they want
[2:40] <jtigg3r> right.
[2:40] <jtigg3r> sweetness.

And if you don't like commandline, sudo port install tig
[2:47] <David Martinez> tig is like a gitx viewer but in ncurses

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License