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 :-) [Scanned]

From
Boyd Stephen Smith Jr. <bss@iguanasuicide.net>
Date
Dec 31, 2008, 03:40 UTC
Message-ID
<200812302141.02248.bss@iguanasuicide.net>
In-Reply-To
<BB5F02FD3789B54E8964D38D6775E718242D36@ALTMORE-SVR.altmore.local>
On Tuesday 2008 December 30 20:30:46 Conor Rafferty wrote:
> MERCURIAL:
>
> Update
> hg update [-C] [-d DATE] [[-r] REV]
Which is the role of "git checkout <branch>"

"git checkout <branch> <paths>" is similar to "hg revert -r <branch> <paths>", but the later seems to handle your use case properly. I don't know much about the workings of hg revert -- it might use the history to determine what's correct, or completely bypass the existing "index" when determining what to drop. In any case, it seems to work better for what you are trying to do. Why not just use it?

I could do with more hg/bzr/darcs experience myself, but git seems to behave the way I like it so it's what I use. When deciding on the right tool for the job, it does help to have many. "To the man with only a hammer, all problems look like nails."

That said, I'm pretty sure that if you hasn't specified '.' and just used "git checkout <branch>" you wouldn't have seen those "artifacts".

-- 
Boyd Stephen Smith Jr.                     ,= ,-_-. =. 
bss@iguanasuicide.net                     ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-' 
http://iguanasuicide.net/                      \_/     
Previous: Conor RaffertyNext: Junio C Hamano
Message 2 of 6 in “RE: for newbs = little exercise / tutorial / warmup for windows and other non-sophisticated new Git users :-) [Scanned]”
  1. Conor RaffertyDec 31, 2008
  2. Boyd Stephen Smith Jr.Dec 31, 2008
  3. Junio C HamanoDec 31, 2008
  4. Daniel BarkalowDec 31, 2008
  5. Junio C HamanoDec 31, 2008
  6. Boyd Stephen Smith Jr.Dec 31, 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.