Re: [BUG] git checkout <branch> allowed with uncommitted changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 13.10.2011 14:42, arQon wrote:
git co -b foo
  Switched to a new branch 'foo'
notepad file1
(edit stuff)
git st
  # On branch foo
  # Changes not staged for commit:
  #       modified:   file1.txt

git co master
  M       file1.txt

Maybe I'm just missing something obvious, but at the time that last "git
co master" was issued:

The file is locally modified.
The file is different on the current branch (foo) than on the branch to which
I am switching (master).

Wrong. On branch foo as well as on master the same old file1.txt is committed. You never staged nor committed the new file1.txt anywhere.

The command fails to refuse to switch branches.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]