Using git locally, I merged from branch D into branch M. But what I want is branch M merged into D. That is, I want to set D to become the active branch and have it reflect the merge. I tried to set the current branch to D based on suggestions in this question: Make an existing Git branch track a remote branch?
git push -u origin D
error: failed to push some refs to 'url'
New to git and not sure if I'm barking up the right tree. Ideally, I'd also like to leave M origin as-was (i.e. not push the merge to it).