Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Can't Merge into master(I'm having trouble merging changes from a new branch into master)
Can't Merge into master [message #1732015] Wed, 11 May 2016 18:48 Go to next message
Mark Baumann is currently offline Mark BaumannFriend
Messages: 2
Registered: May 2016
Junior Member
Hello, I am a new user of both Eclipse and Git. Please forgive the newbie question.

I have no remote repository. I am the only programmer on this project. I am using git for my own personal version control and also just to get some experience learning how to use git.

I created a branch off of master called "HashMapApproach" to try a new approach in my project.

After committing some changes to the HashMapApproach branch, I am happy with how things are working and now I would like to merge those changes into master. But I haven't been able to do that successfully. Here's what I've tried...

I first checkout master. Then I've tried to merge in two ways:
1 - Team -> Merge Tool, but this option is grayed out
2 - In the History view, I right-click on master and choose Merge. This gives the result "Already-up-to-date". However, it never prompted me as to which branch I was trying to merge with.

When I checkout master and look at the History view, I can no longer see the HashMapApproach branch because HEAD points to master and the History stops there. When I checkout HashMapApproach, HEAD now points there and I can see the master which exists farther back in my History. In this case, if I right-click on master in History and choose merge, it again gives me the "Already-up-to-date" message.

All of the above results seem to imply that everything is up-to-date. However, nothing has changed in the master branch and if I checkout the two branches and compare them I see that the two branches are still clearly different. The changes from HashMapApproach have not been merged into master. master is still unchanged.

Is there something obvious I am missing here?

Thank you for your help!

Mark
Re: Can't Merge into master [message #1732105 is a reply to message #1732015] Thu, 12 May 2016 15:48 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
See [1]

The history view has a number of toggle buttons in the top right corner.
If you want to see all commits and all branches ensure that the following buttons are down:
- show all changes in repository
- show all branches and tags

Then
- checkout the branch which should receive the merge commit (master in your case)
- in the history view select the branch you want to merge ("HashMapApproach")
- click "Merge"

[1] https://wiki.eclipse.org/EGit/User_Guide#Starting_merge_from_the_History_View
Re: Can't Merge into master [message #1732153 is a reply to message #1732105] Fri, 13 May 2016 03:03 Go to previous message
Mark Baumann is currently offline Mark BaumannFriend
Messages: 2
Registered: May 2016
Junior Member
That worked! Thank you!
Previous Topic:Support for Large File Storage (LFS)
Next Topic:aborting a conflicted merge
Goto Forum:
  


Current Time: Thu Apr 25 04:29:12 GMT 2024

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

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

Back to the top