From: Victor Engmark <victor.engmark@terreactive.ch>
To: arQon <arqon@gmx.com>
Cc: git@vger.kernel.org
Subject: Re: [BUG] git checkout <branch> allowed with uncommitted changes
Date: Fri, 14 Oct 2011 09:16:38 +0200 [thread overview]
Message-ID: <20111014071638.GB2856@victor.terreactive.ch> (raw)
In-Reply-To: <loom.20111013T175500-495@post.gmane.org>
On Thu, Oct 13, 2011 at 04:17:51PM +0000, arQon wrote:
> Victor Engmark <victor.engmark <at> terreactive.ch> writes:
> > 1. `checkout master` and commit the fix there, then shift back and
> > continue working
>
> I absolutely agree. And it's far more common than any of us would like.
> My point is, you *can't* do this in git without first staging your current branch
> via either commit or stash, or you risk changes bleeding between the branches
> and/or work being lost irretrievably.
It's been pointed out enough times already that work is *not* lost (at
least unless you --force it to) *nor* the branches corrupted, so I'll
just advice to look at more Git documentation. I used CVS 2004-2006 or
so, Subversion 2006-2009, and Git since then. It's vastly superior to
either, and it's really difficult to lose any work unless getting into
the habit of forcing every change.
> This is not something that you would
> expect, and as you say:
>
> > The second most important thing a VCS should do is not destroy any of your
> uncommitted work unless you tell it to
>
> ... which is exactly what git does, and why I have a problem with it.
No, it does not. Others have explained this better already.
> But the response here is uniformly "that's just how git is", so obviously it's
> something you learn to become aware of over time, and avoid. It's not going to
> get "fixed", because people who are used to git don't see it as a bug, so I just
> have to decide whether I can live with it or not.
It took a while to get my head around just how broken the Subversion
model was, and why my expectations from using that model kept resulting
in "weird" state (although don't get me started on `svn clean`). Don't
worry, you'll see the light :)
--
terreActive AG
Kasinostrasse 30
CH-5001 Aarau
Tel: +41 62 834 00 55
Fax: +41 62 823 93 56
www.terreactive.ch
Wir sichern Ihren Erfolg - seit 15 Jahren
next prev parent reply other threads:[~2011-10-14 7:16 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-13 8:40 [BUG] git checkout <branch> allowed with uncommitted changes arQon
2011-10-13 10:48 ` Nguyen Thai Ngoc Duy
2011-10-13 10:59 ` Alexey Shumkin
2011-10-13 11:51 ` arQon
2011-10-13 12:22 ` Andreas Ericsson
2011-10-13 13:09 ` arQon
2011-10-13 13:59 ` Carlos Martín Nieto
2011-10-13 17:09 ` [CLOSED] " arQon
2011-10-13 18:56 ` Alexey Shumkin
2011-10-13 19:01 ` Jakub Narebski
2011-10-13 13:58 ` [BUG] " arQon
2011-10-13 14:46 ` Carlos Martín Nieto
2011-10-13 15:53 ` arQon
2011-10-13 16:17 ` Alexey Shumkin
2011-10-14 6:51 ` Alexey Shumkin
2011-10-13 16:32 ` Holger Hellmuth
2011-10-13 17:04 ` Carlos Martín Nieto
2011-10-13 18:19 ` arQon
2011-10-13 18:28 ` Junio C Hamano
2011-10-13 18:56 ` arQon
2011-10-14 1:38 ` Jeff King
2011-10-14 9:27 ` Holger Hellmuth
2011-10-14 9:54 ` Victor Engmark
2011-10-16 18:25 ` arQon
2011-10-16 20:37 ` Junio C Hamano
2011-10-16 22:04 ` Holger Hellmuth
2011-10-13 20:07 ` Carlos Martín Nieto
2011-10-13 17:06 ` Sergei Organov
2011-10-13 19:44 ` PJ Weisberg
2011-10-13 16:08 ` Holger Hellmuth
2011-10-13 12:42 ` arQon
2011-10-13 12:55 ` Holger Hellmuth
2011-10-13 14:44 ` Victor Engmark
2011-10-13 16:17 ` arQon
2011-10-14 7:16 ` Victor Engmark [this message]
2011-10-13 15:09 ` Michael J Gruber
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=20111014071638.GB2856@victor.terreactive.ch \
--to=victor.engmark@terreactive.ch \
--cc=arqon@gmx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).