All of lore.kernel.org
 help / color / mirror / Atom feed
From: walt <wa1ter@myrealbox.com>
To: git@vger.kernel.org
Subject: Re: My first git success [not quite]
Date: Sat, 14 Jan 2006 07:39:28 -0800	[thread overview]
Message-ID: <dqb5vg$a09$1@sea.gmane.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0601130909290.3535@g5.osdl.org>

Linus Torvalds wrote:
> 
> On Fri, 13 Jan 2006, walt wrote:
>> And it was all so easy I never broke a sweat.  Amazing!

>  ...Most people don't bother to 
> explain their problems well...

I see I still have a problem:  my mental model of how git
works is still wrong.

I used 'git-checkout -b test' to create a disposable place
to test the patch I was given.

Okay, making sure I'm now sitting in 'test', I apply the
patch to foo.c and do my testing.

Now, intending to delete my 'test' branch, I do git-checkout
master.  My mental model predicts that 'master' should still
be identical to 'origin' because I did the patching in 'test'.
Am I right so far?

The problem I see is that, after switching back to 'master',
foo.c is the patched version, not your original version.  I
figured that the git-checkout would overwrite any changes I
made to foo.c, but that doesn't seem to be the case.  To get
your original version back I had to delete foo.c and do a
git-checkout foo.c (or git-checkout -f master).

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.

Can someone hit me with the clue-stick here?  Thanks!

  parent reply	other threads:[~2006-01-14 15:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-13 14:51 My first git success walt
2006-01-13 17:11 ` Linus Torvalds
2006-01-13 18:57   ` Randal L. Schwartz
2006-01-13 19:37     ` Junio C Hamano
2006-01-13 20:14     ` Peter Eriksen
2006-01-14 15:39   ` walt [this message]
2006-01-14 15:55     ` My first git success [not quite] sean
2006-01-14 15:55       ` sean
2006-01-14 17:18         ` walt
2006-01-14 17:48           ` Randal L. Schwartz
2006-01-14 20:31             ` Junio C Hamano
2006-01-14 19:25     ` Linus Torvalds
2006-01-14 20:41       ` walt
2006-01-14 20:49         ` Junio C Hamano
2006-01-14 21:57         ` Linus Torvalds
2006-01-15 10:44       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='dqb5vg$a09$1@sea.gmane.org' \
    --to=wa1ter@myrealbox.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.