|potentially risk during branch switch [message #662779]
||Thu, 31 March 2011 22:00
Registered: March 2011
I have Egit/JGit plugin 0.11.3, eclipse 3.5.2.|
I create local branch (eg "masterTask1") on base of remote branch (eg "master").
Next I create second branch (eg "masterTask2") on base of the same remote branch ("master").
I checkout "masterTask1", make some changes in files, and then I checkout "masterTask2". After this I still can see changes I made in "masterTask1" !!!
Eclipse even not warn me, that there are some uncomitted changes.
This problem not happens when branches are created on different remote branches, only when they are on the same remote branch.
[Updated on: Thu, 14 April 2011 21:17]
Report message to a moderator
|Re: critical bug in local branch [message #665784 is a reply to message #665519]
||Fri, 15 April 2011 22:17
| Robin Rosenberg
Registered: July 2009
On 2011-04-14 23.16, Pawel wrote:|
> Thank you for response.
> You right, thats the way how native git works.
> So it's not a bug.
> But...I think it is a place for potentially mistakes.
> I think there is a very big risk, not to notice those changes and commit
> them accidentialy in incorrect branch.
> I think taht icon or color on branch name, sygnalizing status (git
> status) would be great. I could then, easy check if there are any
> uncommited changes, and not to switch.
> By the way
> If you don't want your changes stays in workspace during switch, you
> need to use: "git stash" before switch. But there is a risk, that stash
> not hide unstaged changes....
> And Egit not support stash...
I think it would be a good idea for EGit to ask the user what to do when
there are uncommitted changes, even untracked ones and allow the user to
stash, commit, discard or bring along changes.
Powered by FUDForum
. Page generated in 0.03222 seconds