I had mine solved by overriding the branch:
My case: I wanted to override whatever code is in the develop
with version_2
.
git checkout version_2
git branch -D develop
version_2
and force push to git:git checkout -b `develop`
git push origin `develop`
I didn't need to rebase. But in my case, I didn't need to take code from my old code.