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

Re: for newbs = little exercise / tutorial / warmup for windows and other non-sophisticated new Git users :-)

From
ZZorba <cr@altmore.co.uk>
Date
Dec 30, 2008, 17:04 UTC
Message-ID
<gjdlcl$5no$4@ger.gmane.org>
In-Reply-To
<gjdh0r$n3c$4@ger.gmane.org>
Ok, when I do

$ rm *.* $ git checkout versionA .

I'm getting ABC.txt, AC.txt, BC.txt
which is wrong as only the first two files went into version A
Paradoxically

$ rm *.* $ git reset --hard versionA

produces the desired result!

I picked up a few cases like this with git-checkout today. Usually a file or two gets copied into the working tree that shouldn't have been (and I'm clearing the working tree before each checkout, so its not "leftovers", its defo git-checkout doing it)

Its coming back to me now - when I was writing my "warm-up" I tried both git-checkout and git-reset, to do my "rollbacks" and git-checkout produced a few inconsistent results like above, so I decided to stick with git-reset (this was before I knew the dangers of git-reset of course!) for "safety".

Could it be that all the "vandalism" I've perpetrated to the history by resetting in a FORWARD direction could have corrupted the history somehow ?

Even so, you'd expect something vanilla like $ git checkout not to be affected.

I'm gonna try the checkouts without doing any resetting beforehand (i.e. no messing with the history) to see if I can reproduce this.

"Zorba" <cr@altmore.co.uk> wrote in message news:gjdh0r$n3c$4@ger.gmane.org...

** have now promoted git-checkout as the way to review older versions I've left git-reset in there, for my own notes as much as anything, but not suggesting it be used as some sort of cursor to move the HEAD up and down the branch

NB getting some funny results with git-checkout near the head of the branch
- will investigatge and report
Previous: ZorbaNext: Zorba
Message 9 of 21 in “for newbs = little exercise / tutorial / warmup for windows and other non-sophisticated new Git users :-)”
  1. ZorbaDec 27, 2008
  2. ZorbaDec 28, 2008
  3. Jeff WhitesideDec 29, 2008
  4. ZorbaDec 30, 2008
  5. Jeff WhitesideDec 30, 2008
  6. ZorbaDec 30, 2008
  7. Sitaram ChamartyDec 30, 2008
  8. ZorbaDec 30, 2008
  9. ZorbaDec 30, 2008
  10. ZorbaDec 30, 2008
  11. Jeff WhitesideDec 30, 2008
  12. ZorbaDec 30, 2008
  13. Jeff WhitesideDec 30, 2008
  14. Daniel BarkalowDec 30, 2008
  15. ZorbaDec 31, 2008
  16. ZorbaDec 30, 2008
  17. Boyd Stephen Smith Jr.Dec 30, 2008
  18. Boyd Stephen Smith Jr.Dec 30, 2008
  19. Boyd Stephen Smith Jr.Dec 30, 2008
  20. Sitaram ChamartyDec 31, 2008
  21. Daniel BarkalowDec 30, 2008

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.