egit: changes made in one branch are visible on another branch without any commit

亡梦爱人 提交于 2019-12-01 11:38:29

This is not a problem with egit, but the default behavior for how git works in general.

If you make some changes, and do not add/commit them into git, then they are applied to any branch you checkout next.

Only when the changes can not be automatically applied on checkout will you receive an error asking you to either stash your changes, or telling you that the file to be checked out already exists and hence checkout cannot proceed.

So if you make changes when on another branch and want to keep those changes in that branch only, add and commit them. Alternatively, you can stash your changes as well.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!