I started working on branchB. Which was branched off from branchA. After a few weeks, the mainline branch develop have had a lots of commits merged in. Both branches A and B are way behind.
--d1--d2--d3 ...2 weeks later... --d253 develop
\
a1--a2--a3 branchA
\
b1--b2--b3 branchB (current)
I would like to keep up to date with the develop branch. And prefer to rebase my branchB off develop at its latest commit d253. Also all commits from branchA should be ignored. This will avoid me a huge effort of resolving merge conflicts (there are a lots). Because I am not the maintainer of that branchA. I can recreate in my branchB the dependecies I need from A. Not sure if I should do that before or after the rebase.
--d1--d2--d3 ..... --d253 develop
\ \
a1--a2--a3 \
\
b1'--b2'--b3'
Q1. Is it correct to do
git checkout develop
git pull
git checkout branchB
git rebase --onto develop branchA
Q2. Let's assume the number of conflicts is quite important, about 30 files. Is rebase still a good approach compared to git merge develop
?