From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: "Rhodes, Kate" <masukomi@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [Bug?] uncommited changes cross branches
Date: Tue, 5 Feb 2008 15:07:12 +0000 (GMT) [thread overview]
Message-ID: <alpine.LSU.1.00.0802051502360.8543@racer.site> (raw)
In-Reply-To: <CB070331-8CA6-42CD-9CAD-20371F16DCD8@gmail.com>
Hi,
On Tue, 5 Feb 2008, Rhodes, Kate wrote:
> If you have a file that exists in two branches in the same repo, make a
> change to it without committing, then switch branches the changes carry
> over, but if you make changes to a file that exists in only one of the
> repos and try and switch branches Git complains that the file isn't
> uptodate. The latter behavior seems correct to me.
It is slightly different: if you change a file without committing _-and-
the switch to another branch does not touch the file, git does not
complain.
The rationale: git should refuse to switch branches _only_ if uncommitted
changes would be lost.
However, if you change a file whose content is different in the other
branch (and "not existing" qualifies), the uncommitted changes would be
lost, and git should complain.
Ciao,
Dscho
next prev parent reply other threads:[~2008-02-05 15:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-05 14:45 [Bug?] uncommited changes cross branches Rhodes, Kate
2008-02-05 15:07 ` Johannes Schindelin [this message]
2008-02-05 20:34 ` Rhodes, Kate
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=alpine.LSU.1.00.0802051502360.8543@racer.site \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=masukomi@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox