$ git checkout feature/myfeature
$ git rebase origin/master
...
<resolved conflicts>
...
$ git rebase --continue, git rebase --continue, …
$ git push -f origin feature/myfeature
As the referenced StackOverflow discussion describes:
“When performing a merge, ours refers to the branch you're merging into, and theirs refers to the branch you are merging from. So if you are trying to resolve conflicts in the middle of a merge:
When rebasing, ours and theirs are inverted. Rebases pick files into a "detached" HEAD branch. The target is that HEAD branch, and merge-from is the original branch before rebase. That makes:
Resolve conflicts using THEIRS when re-basing
So, suppose you’ve just checked out branch “feature/myfeature“, then kicked off the rebase “$ git rebase origin/master“, and merge conflict [ CONFLICT (content): Merge conflict in themes/themex/dist/css/main.css ] are raised, and you wish to have those changes introduced in “feature/myfeature“ override what’s in master branch, then you’d want to resolve conflicts using theirs. This is because when you’re merging “feature/myfeature“ into master, then you’re switched into the master branch and changes are replayed on top of that branch, and hence the theirs will now be referring to “feature/myfeature“.
I.e., rebasing replays the current branch's commits (one at a time) on top of the branch that we intend to rebase with.“
References