title: Git replace master branch with another branch - git merge -s ours?
body: <p>I am fairly new to Git, having only been using it for the last few months, since taking on a new client (it was what they had been using to manage version control of their software before I started working for them). </p>
  
  <p>I recently merged a <code>development</code> branch with my local <code>master</code> branch, and pushed <code>master</code> to the server. I had tested the site (website written in Django/ Python) on my local development machine prior to pushing it to the server, and it all appeared to be working correctly (including the bug fix that had been implemented on the <code>development</code> branch).</p>
  
  <p>However, after testing the changes that had been made after pushing to the server, I found that something had broken a part of the site. So I checked out an old <code>commit</code> on the server, and the live version is now using that old <code>commit</code>, meaning that it is in a 'Detached HEAD' state, but is functional.</p>
  
  <p>So, my local <code>master</code> branch is currently the version with the bug fix that I had pushed to the server (which is working locally, but didn't on the server), but since I need to work on another aspect of the site, I want to revert to a backup of <code>master</code> that I had made prior to merging the <code>development</code> branch with the bug fix into <code>master</code>, so that I am developing from the 'most recent working' state of the code.</p>
  
  <p>The branches I have on my machine are:</p>
  
  <p><code>master</code> (with <code>development</code> merged into it, which has broken something else)</p>
  
  <p><code>masterBackup</code> (i.e. the <code>master</code> branch as it was before merging <code>development</code> into it)</p>
  
  <p><code>development</code> (which is the branch on which the original bug has been fixed, but something else is now broken)</p>
  
  <p>So effectively, <code>masterBackup</code> is actually my working 'master' branch at the moment, since merging <code>development</code> into <code>master</code> broke <code>master</code>. I want to make <code>masterBackup</code> my 'master' branch again, and <code>master</code> in its current state can be discarded/ removed. I still have the <code>development</code> branch, so can look into why/ how this broke the site and fix it there before merging it to <code>master</code> again.</p>
  
  <p>I found the question at <a href="https://stackoverflow.com/questions/2862590/how-to-replace-master-branch-in-git-entirely-from-another-branch">How to replace master branch in git, entirely, from another branch?</a> on which the accepted answer indicates that I should do the following steps:</p>
  
  <pre><code>git checkout masterBackup
  git merge -s ours master
  git checkout master
  git merge masterBackup
  </code></pre>
  
  <p>But I can't find anything definitive explaining what the command <code>git merge -s ours</code> does... is this definitely how to make my <code>masterBackup</code> branch the <code>master</code> branch again?</p>