In our repository we have two long living branches: main
(green) & staging
(blue).
These do not have a common parent, they are completely unrelated.
What I'm trying to do is branch off of main
, do some commits and then merge to staging
.
What I've done so far is to cherry pick the orange commit into staging
. But I'm wondering if I couldn't do it some other way.
I've tried the following:
git checkout staging
git merge feature --allow-unrelated-histories
But this caused chaos, 3000 mismatching files had conflicts, when the orange commit only contained a new file.