I had checked out somebranch. A colleague has done some work and rebased it, now origin/somebranch is parallel to somebranch. I've done no work on the branch, but I am 14 commits behind, 3 commits ahead and with merge conflicts on two files. What do I do to not add a junk merge now?
Bonus question: what should I do if I had done some local work on the pre-overwrite branch?
EDIT:
To clarify what I've done. I did
git fetch
git checkout somebranch
Some time later I clicked on the sync button in vscode which, as far as I know, does attempt
git pull origin somebranch
git push origin somebranch
The operation failed, there has been a merge initiated on two files.
The histories now look like (a longer version of) this:
* 8e1e0ed - (2 days ago) commit9 (origin/somebranch)
* c87977f - (9 days ago) commit8
* adfc49e - (3 weeks ago) commit2
* 7c8e72e - (3 weeks ago) commit1
* e158c80 - (8 days ago) commit7 (origin/master, master)
* 2357f78 - (8 days ago) commit6
| * 7b507a3 - (9 days ago) commit5 (HEAD -> somebranch)
| * 2a7af7b - (3 weeks ago) commit2
| * c424261 - (3 weeks ago) commit1
|/
* 48098a0 - (3 weeks ago) commit0
I.e. commit1 and commit2 are different on my version of branch and origin. And commit5 is replaced with other commits. What am I supposed to do now?