git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Andreas Ericsson
Message 12 of 12 in “git-reset and clones”
  1. Paul JakmaMar 16, 2006
  2. seanMar 16, 2006
  3. Paul JakmaMar 16, 2006
  4. Andreas EricssonMar 16, 2006
  5. Andreas EricssonMar 16, 2006
  6. seanMar 16, 2006
  7. Junio C HamanoMar 17, 2006
  8. Jon LoeligerMar 17, 2006
  9. Junio C HamanoMar 17, 2006
  10. Jon LoeligerMar 17, 2006
  11. Andreas EricssonMar 17, 2006
  12. Petr BaudisMar 19, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.