Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Changes made on branch appear on master.
Changes made on branch appear on master. [message #1436766] Fri, 03 October 2014 11:29 Go to next message
Fredrik Berg is currently offline Fredrik BergFriend
Messages: 4
Registered: September 2014
Junior Member
As the title says, when i create a new branch in EGit and start making some changes all branches in my local repository gets changed.

This is a picture of my git configuration:

You can also see my branches. So when i for example add a line in "disconnectWork" it automatically gets added in "master" and "origin/master" without me merging. Afaik this should not happen and if so, whats the point of branches then?

Is this making any sense, and is there something i can do to fix this?
  • Attachment: Untitled.jpg
    (Size: 282.07KB, Downloaded 360 times)
Re: Changes made on branch appear on master. [message #1437137 is a reply to message #1436766] Fri, 03 October 2014 23:51 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1138
Registered: July 2009
Senior Member
You probably didn't commit the line you added in disconnectWork, this means this modification only resides in
the working tree, if you checkout another branch this modification is still in the working tree. So if you want
to separate your work on different branches you have to commit the modifications.

In order to protect you against data loss if your working directory or staging area has uncommitted changes
that conflict with the branch you're checking out, Git won't let you switch branches
Previous Topic:gitignore and importing projects
Next Topic:Access GIT Repository hosted on a Windows 2008 Server in a cloud
Goto Forum:

Current Time: Mon Jun 01 22:49:18 GMT 2020

Powered by FUDForum. Page generated in 0.02378 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top