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

Re: My first git success [not quite]

From
Wwalt <wa1ter@myrealbox.com>
Date
Jan 14, 2006, 17:18 UTC
Message-ID
<dqbbo9$s49$1@sea.gmane.org>
In-Reply-To
<BAYC1-PASMTP10B423DC1B2FC1F8C9992BAE190@CEZ.ICE>
sean wrote:
> > On Sat, 14 Jan 2006 07:39:28 -0800
> > walt <wa1ter@myrealbox.com> wrote:
[...]
>> >> So, I clearly don't understand what git-checkout does.  It
>> >> doesn't seem to touch the already-checked-out sources at
>> >> all, which is what I would expect it to do.
Show 6 quoted lines
> > Hi Walt,
> >
> > When you switch branches _uncommitted_ changes will stay in
> > your working directory.   This lets you change to a different
> > branch before committing something you're working on for
> > instance.
Ah!  The underlying reason is what I was missing.
> >   So likely, even though you had switched to your
> > test branch to apply the patch, you didn't actually commit
> > it into that branch before switching back to master.

Right. And *my* reasoning (FWIW) is that I was intending to throw the entire branch away so I didn't see any need to commit. (But men always have that problem ;o)

I suppose the underlying problem is that I don't think like a developer. My wish for a future improvement for git would be a bonehead<-->expert switch that would turn on some basic warning messages. In this particular example, I would have welcomed a warning message that said: "You have uncommitted changes! Hit 'D' to discard them or <Enter> to keep them without committing". An experienced git user would want to turn that off, most likely.

Thanks for the clue-stick, and I very much appreciate your patience.

Previous: seanNext: Randal L. Schwartz
Message 8 of 15 in “My first git success”
  1. waltJan 13, 2006
  2. Linus TorvaldsJan 13, 2006
  3. Randal L. SchwartzJan 13, 2006
  4. Junio C HamanoJan 13, 2006
  5. Peter EriksenJan 13, 2006
  6. waltJan 14, 2006
  7. seanJan 14, 2006
  8. waltJan 14, 2006
  9. Randal L. SchwartzJan 14, 2006
  10. Junio C HamanoJan 14, 2006
  11. Linus TorvaldsJan 14, 2006
  12. waltJan 14, 2006
  13. Junio C HamanoJan 14, 2006
  14. Linus TorvaldsJan 14, 2006
  15. Junio C HamanoJan 15, 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.