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

Re: git-reset and clones

From
sean <seanlkml@sympatico.ca>
Date
Mar 16, 2006, 14:52 UTC
Message-ID
<BAYC1-PASMTP09E59C4F23C4CDF45B1C42AEE70@CEZ.ICE>
In-Reply-To
<Pine.LNX.4.64.0603161424310.5276@sheen.jakma.org>

On Thu, 16 Mar 2006 14:34:42 +0000 (GMT) Paul Jakma <paul@clubi.ie> wrote:

Show 14 quoted lines
> If a git repository has a reset HEAD~X done, then any later pulls in 
> clone repositories get /really/ upset, with:
> 
> $ git pull
> * refs/heads/origin: does not fast forward to branch 'master' of 
> /home/paul/foo-git/;
> 
> Type of thing. This seems to be a similar issue to:
> 
>  	http://www.gelato.unsw.edu.au/archives/git/0510/10767.html
> 
> The question is has this improved at all since last year? Is there 
> anything the origin repository maintainer (the one who did reset) can 
> do to recover from this?

It's still not a recommended operation on a repository that is pulled by others. If you realize you made a mistake by resetting the head, you can undo the operation afterward with:

$ git reset ORIG_HEAD
Sean
Previous: Paul JakmaNext: Paul Jakma
Message 2 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.