I just finished working on 2 separate develop branches that were originally branched off of the main Master branch. Here is the flow I used in branching off of the Master Branch to create these 2 develop branches:
Master
|--> DevelopBranch1
|
-->DevelopBranch2
So originally I created DevelopBranch1
by branching from Master
. Then I created DevelopBranch2
by branching off of DevelopBranch1
. My reasoning behind this decision was because DevelopBranch2
depended on new changes I made within DevelopBranch1
.
I finished making changes to DevelopBranch1
. Since DevelopBranch2
did not originally branch off of Master
, I now want to do a few things:
1) Merge DevelopBranch1
into Master
2) Reparent DevelopBranch2
into Master
3) Merge DevelopBranch2
into Master
4) Archive DevelopBranch1
I was successful in Merging DevelopBranch1
into Master
ok by using SourceTree by checking out Master
and Merging it with the latest commit from DevelopBranch1
.
When I got to step 2, this is where I ran into issues. I used the following git command to Reparent:
git checkout master
git rebase --onto DevelopBranch2
After the rebase command, I noticed within SourceTree that the latest commit from Master
got moved to the latest commit within DevelopBranch2
.
At this point, I tried Merging Master
into DevelopBranch2
. After using this Merge and running git status
, I got the following message
On branch master
Your branch and 'origin/master' have diverged,
and have 5 and 7 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
I then ran git pull
and got this message:
git pull
error: Pulling is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.
This is where I'm currently stuck.
Any help would be greatly appreciated!