GitHub

Philippe Bruhat (BooK) philippe.bruhat at free.fr
Fri Jun 5 08:02:37 GMT 2009


On Tue, Jun 02, 2009 at 07:11:48PM +0100, Andy Armstrong wrote:
> On 2 Jun 2009, at 19:09, David E. Wheeler wrote:
> > On Jun 2, 2009, at 11:07 AM, Andy Armstrong wrote:
> >
> >> Yeah, I think that's because you can do that with svn - because it's
> >> just a filesystem. My understanding is that it's more gittish to have
> >> a 1 to 1 project to repo mapping.
> >
> > +1. But see HOP for another example:
> >
> >   http://github.com/Ovid/hop/tree/master
> 
> 
> Yeah, that's the way I've been headed with but I'm not sure I like it  
> for our needs.

In git, every commit is a snapshot: all files and dirs are there (trees
in git parlance). The rest of the commit is meta infomation (author,
date, log message, parents).

It's extremely easy to "rewrite" history (rather, make a new one), by
simply rearranging the trees (snapshots) into new commits with new meta
information (author, date, parent, log message). Of course, you don't
want to do that often, since everyone who has a clone will have to drop
it and clone again, and you run the risk that anyone who can push to
your repository will push the old version of the history, instead of the
new one.

I cooked up a script to rewrite the history I got from git-svn (and
cvs2svn) to look exactly like I wanted, including "fixing" the SVN
merges, and putting the tags where they should be, all automatically
(once you've edited the config file that links the tree and new commits
to their new parents, using a mapping from old to new commit ids).
This mostly uses git "plumbing" commands, like git commit-tree.

The nice thing is that you can always start with something "not so good"
and create your "better" history later, when you've made your decision.
That of course requires some communication, but it can be done.

For those who want to make sense of the core of git, try this link:
http://tom.preston-werner.com/2009/05/19/the-git-parable.html

There are also nice PDF slides here, with pictures:
http://inso.cc/wp/2008/04/10/get-the-git-slides/

-- 
 Philippe Bruhat (BooK)

 Everyone acts their age... mental, if not physical.
                                    (Moral from Groo The Wanderer #92 (Epic))


More information about the tapx-dev mailing list