git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eugene Sajine <euguess@gmail.com>
To: git@vger.kernel.org
Cc: Eugene Sajine <euguess@gmail.com>
Subject: You have local changes; cannot switch branches error question
Date: Thu, 24 Dec 2009 17:25:37 -0500	[thread overview]
Message-ID: <76c5b8580912241425k741b24e9ie8ed92ca7cb8a659@mail.gmail.com> (raw)

First of all Merry Christmas and Happy New Year to everybody! I wish
Git to move to global dominance during next year even faster then it
does now;)

My question is related to the fact that most of the time when i have
some local file changes Git is switching branches OK. But from time to
time in some repos I'm hitting this error and I cannot figure out why
it suddenly starts to complain about it?

For example in one of my repos I somehow got to a state when I have
three files modified, and when I'm trying to switch branches it
complains about one of them being changed locally, so it refuses to
switch branch

OTOH i have tried many different scenarios in another repo to leave
some uncommitted staged or not staged  changes and switch branches and
same version of git does that just fine. (v 1.6.5.6).

So, what is correct behavior - do not switch or switch branches when
there are uncommitted changes?

Thanks,
Eugene

             reply	other threads:[~2009-12-24 22:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-24 22:25 Eugene Sajine [this message]
2009-12-24 22:59 ` You have local changes; cannot switch branches error question Nanako Shiraishi
2009-12-24 23:32 ` Junio C Hamano
2009-12-25 14:32   ` Matthieu Moy

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=76c5b8580912241425k741b24e9ie8ed92ca7cb8a659@mail.gmail.com \
    --to=euguess@gmail.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).