potentially risk during branch switch [message #662779] |
Thu, 31 March 2011 18:00  |
Eclipse User |
|
|
|
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.
Best regards
Pawel
[Updated on: Thu, 14 April 2011 17:17] by Moderator
|
|
|
|
|
Re: critical bug in local branch [message #665784 is a reply to message #665519] |
Fri, 15 April 2011 18:17   |
Eclipse User |
|
|
|
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.
-- robin
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.24486 seconds