Tobia
Tobia

Reputation: 9506

How to merge branches with Eclipse Egit

I'm using Eclipse 4.15/2020-03 to syncronize two branches from git repo. I opened the Synchronize view and I see all the differences, but... I cannot edit the file, how can I edit it?

Upvotes: 0

Views: 14555

Answers (1)

David M. Karr
David M. Karr

Reputation: 15205

I never use the Synchronize view with git. I imagine it could work, I just focus on merging.

You will have a particular branch checked out. Your task is to merge a different branch into that branch.

After doing a "fetch" to ensure that your branch metadata is up to date, right-click on the repository and select "Merge...". Select the branch you want to merge into your current branch.

After that completes, inspect the "Git Staging" view. Any files that merged without conflicts will be in the "Staged Changes" list, and files with conflicts will be in the "Unstaged Changes" list.

If you want to inspect the files with conflicts, double-clicking on each one will go into the compare view, but you can also right-click on each and select "Open Working Tree Version" to see the raw file contents, with conflict markers.

Upvotes: 3

Related Questions