Understanding the functioning of git rebase

Rohit Bajaj
Rohit Bajaj used Ask the Experts™
on
Hi,
I am doing git rebase on a branch. There was some conflicts i resolved it and did git add
and then performed git rebase --continue
but got the same conflict again.
I tried this 2 times and still on the same conflict.

How to resolve this and what could be the reason for this ?
Here is the screenshot of the terminal :
Screen-Shot-2019-01-12-at-5.13.07-PM.pngThanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Fractional CTO
Distinguished Expert 2018
Commented:
Fixing this type of problem can be complex.

Since you have a 3-way merge that fails, this means 2x people have changed pom.xml so there's a repository copy + 2x changed copies.

If one of the 2x people who've changed pom.xml is you, this is fairly easy to resolve, by doing this...

cd top-of-tree
mv service/pom.xml ~/.
git checkout -- service/pom.xml
mv ~/pom.xml service/pom.xml
git commit service/pom.xml
get rebase --continue

Open in new window


By removing your version of pom.xml out of the tree + starting with the repository copy, you should only have a 2-way merge to resolve.

If other people have created the changes to pom.xml then you'll likely have to go through this process with one of them, to break the 3-way merge conflict.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial