title: Bring gh-pages up to date with the latest commit of master
body: <p>I am using SourceTree in combination with a Github repository for version control for a project. For a while, I've been using <code>master</code> to commit all new changes, but every now and then, I want the <code>gh-pages</code> branch to fast-forward to the latest commit of <code>master</code>, so that I can update the live page with the page I have in production (usually when a major update is finished).</p>
  
  <p>I have tried rebasing, as another SO post suggested, but this made the problem even worse, as SourceTree had me manually choose what changes I wanted and the rebasing took a little while especially considering the amount of commits between the last update of <code>gh-pages</code>. After successfully rebasing in one project, I could basically sync the <code>gh-pages</code> branch to <code>master</code> whenever I desired and all in-between versions would commit automatically (I could not reproduce the same behavior in another repository though). However, what I want is to get the last commit and overwrite all files. To do this, I usually just copy the whole folder while on <code>master</code> branch to another location, then switch to <code>gh-pages</code> and overwrite all files manually. This is sub-optimal, though and can get really problematic for larger projects.</p>
  
  <p>So, what I want and need is to automate this procedure, either through SourceTree or via a script.</p>
  
  <p><strong>TL;DR</strong>: I need a way to update <code>gh-pages</code> to the latest <code>master</code> commit semi-automatically, which will overwrite all files with the ones in <code>master</code> without rebasing and will then push them to the Github repository.</p>