title: git command for making one branch like another
body: <p>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 neither <code>git reset</code> or <code>git rebase</code> are really viable, since they change history, which is a bad thing with a branch that's already been pushed.</p>
  
  <p>I've also tried <code>git merge</code> with various strategies but none of them undo the local changes, i.e. if I'd added a file, a merge might bring other files back in line, but I'll still have that file that the upstream doesn't have.</p>
  
  <p>I could just create a new branch off the upstream, but i'd really like a merge that in terms of revision history applies all the changes to take my branch and make it identical to the upstream again, so that I can safely push that change without clobbering history. Is there such a command or series of commands?</p>