[cfe-dev] [LLVMdev] repo.or.cz GIT mirrors

Matthieu Moy Matthieu.Moy at grenoble-inp.fr
Thu Feb 24 10:48:47 PST 2011


greened at obbligato.org (David A. Greene) writes:

>> Each clonee should do "git-svn dcommit" individually.
>> (and it would be happier if you did "git pull --rebase llvm.org)
>
> Yep.
>
>> Of course, other branches may be push/pull-ed among repos. It is git!
>
> Does this mean that clone B can pull from clone A and vice-versa? 

The problem is the "rebase" step. Rebase is great to keep your history
clean, but rewrites history. If you had local commits C1 and C2, 
"git pull --rebase" will replay C1 and C2 on top of the new HEAD,
creating new commits C1' and C2' that look like C1 and C2 without being
the same. As opposed to that, "git pull" (without rebase) creates a
merge commit on top of C2 and the new HEAD.

This means that if someone pulled your C1 and C2, you rebased, and
the other clone pulls again, it won't notice that C1/C2 and C1'/C2' are
meant to be the same, and do awkward things instead of a clean merge.

So, you may pull from a clone to another, but you cannot alternatively
pull from a clone to another and rebase on upstream without getting into
trouble.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/



More information about the cfe-dev mailing list