Skip to main content



      Home
Home » Eclipse Projects » EGit / JGit » Unable to Save Resolved Conflicts in EGIT(Conflict resolution windows do not seem to be working right)
Unable to Save Resolved Conflicts in EGIT [message #1786284] Sun, 29 April 2018 09:48 Go to next message
Eclipse UserFriend
I am trying to merge a branch into my master for a Java project. I don't understand why there are conflicts but in any case I am in the Compare and Index view. I clicked the current change left to right icon. The supposedly modified source file (right side) is then moved from the unstaged to staged area automatically. However, the source icon still has the red X and that file is in both the staged and unstaged areas. When I look at the staged source it still has the same conflicts. What am I doing wrong?

As for the conflicts, they all seem to be the changes I made in the new branch. For example:

In master I have:
public double DOOROPENRATE=1.0;


In the branch I have:
public double DOOROPENRATE=.25;


That's not a conflict, that is a change I want to merge from the branch into the master. TIA.

[Updated on: Sun, 29 April 2018 09:57] by Moderator

Re: Unable to Save Resolved Conflicts in EGIT [message #1786291 is a reply to message #1786284] Sun, 29 April 2018 22:04 Go to previous messageGo to next message
Eclipse UserFriend
You have to explicitly stage the changes from the working directory, if I'm reading this right. https://wiki.eclipse.org/EGit/User_Guide#Adding_conflict_resolution_to_the_git_index
Re: Unable to Save Resolved Conflicts in EGIT [message #1786301 is a reply to message #1786291] Mon, 30 April 2018 09:05 Go to previous messageGo to next message
Eclipse UserFriend
Thanks but that didn't help. I wound up manually editing the sources to get rid of the conflicts. I also saw that many added lines were missing as well. I royally screwed up something in the merge but I have no idea what. Hopefully if I delete the branch, future branches will work.
Re: Unable to Save Resolved Conflicts in EGIT [message #1786750 is a reply to message #1786301] Thu, 10 May 2018 10:58 Go to previous message
Eclipse UserFriend
Git and also JGit generate conflict markers into the files having conflicts during a merge.
You can either open the file in the editor and edit it there or open merge tool from staging view and edit the left pane.
The merge tool has two modes which can be configured under Preferences > Team > Git > Merge - Merge Tool
- last HEAD (unmerged)
- workspace (pre-merged by git)
in the merge tool edit the left side until you have resolved the conflict.
Then mark the conflict resolved by adding (staging) the conflicting file. This is typically done in the
staging view.
Previous Topic:Can't add master branch
Next Topic:No class files when including jgit as dependency
Goto Forum:
  


Current Time: Thu Jul 03 06:27:41 EDT 2025

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

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

Back to the top