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

git-reset and clones

From
PJPaul Jakma <paul@clubi.ie>
Date
Mar 16, 2006, 14:34 UTC
Message-ID
<Pine.LNX.4.64.0603161424310.5276@sheen.jakma.org>
Hi,
Next dumb question:

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?

I'm guessing the answer is:
Yes:
1. where git-reset has already been done, manually update the
   refs back to the previous HEAD
2. then use git-revert, and continue to use git-revert only.

My question then would be, presuming some innocent repository maintainer has already done 1, what's the easiest way to accomplish 1?

(they shouldn't have done it obviously, but assume they're git newbies, made an honest mistake and now need to recover, preferably without having to involve those who pull).

regards,
-- 
Paul Jakma	paul@clubi.ie	paul@jakma.org	Key ID: 64A2FF6A
Fortune:
Be cautious in your daily affairs.
Next: sean
Message 1 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.