I\'m trying to take a branch with changes and bring it back to be identical to the upstream it diverged from. The changes are both local and have been pushed to github, so n
You can do this rather easily now:
$ git fetch origin $ git merge origin/master -s recursive -Xtheirs
This gets your local repo in-sync with the origin, and preserves the history.