Re: git-reset and clones
- From
Petr Baudis <pasky@suse.cz>
- Date
- Mar 19, 2006, 21:40 UTC
- Message-ID
- <20060319214038.GF18185@pasky.or.cz>
- In-Reply-To
- <7v4q1x95yo.fsf@assigned-by-dhcp.cox.net>
Dear diary, on Fri, Mar 17, 2006 at 03:10:23AM CET, I got a letter where Junio C Hamano <junkio@cox.net> said that...
Show 17 quoted lines
> You used to have something like this: > > > o---o---o---A > / ^ your HEAD used to point at here > ---o---o---o > > and you forgot other people already have the commit chain up to > commit A. But you rewound and did cleanups: > > o---o---o---A > / > ---o---o---o---o---o---B > ^ your HEAD now points at here > > People who track your HEAD have A and your updated head B does > not fast forward. Oops.
Just for the sake of completeness, this is a GIT-only doctrine; Cogito is more confiding and has less strict requirements.
First, when fetching, it does not care at all whether the new head is a fast-forward of the original one or not.
Second, when the people who are tracking you had A as their current master head _and_ also the origin remote head (or whichever their respective branch names are), their current master head will be updated to B when cg-updating, as Cogito pretends it to be a fast-forward even though it is not.
So, in the simple tracking cases, Cogito will do the right thing, if you use cg-update.
-- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ Right now I am having amnesia and deja-vu at the same time. I think I have forgotten this before.