Reputation: 197
Here's my situation: Made various changes to feature-branch with ~ 30 commits Need to pull develop-branch from Github and merge it with the changes on feature-branch.
This is what I've attempted:
git pull --rebase origin develop
CONFLICT (content): Merge conflict in users.py
I resolve the conflict then,
git add users.py
git status # everything looks clean, couple of untracked files
git rebase --continue
return: No changes - did you forget to use 'git add'?
If there is nothing left to stage, chances are that something else
already introduced the same changes; you might want to skip this patch.
git rebase --skip
CONFLICT # this time, same file but different commit!
So basically, as I resolved conflicts and staged each file, other conflicts were introduced. I noticed that there was a conflict between feature-branch and develop-branch on every commit I had made to feature-branch! How can I resolve this??
Upvotes: 1
Views: 1404
Reputation: 4061
When you do a rebase what git does is use the last common commit on both the branches and applies the upstream changes first and then it puts all the local commits that were made after the diverge on top of the upstream changes. During this rebase process, git applies the commits one by one onto the upstream changes.
So it is possible that all the changes in your feature branch may in some way conflict with the develop branch unless they are part of a file that does not exist in the develop branch
Upvotes: 2