 <p>The following set of commands should get you into an identical state with the remote branch:</p> <pre><code>git checkout -f master # Check out the local 'master' branch git fetch origin # Fetch the 'origin' remote git reset --hard origin/master # Reset all tracked files to remote state git clean -dxff # Remove all non-tracked files </code></pre> <p>Note that (for obvious reasons), these commands are potentially destructive - that is, any local changes that are overwritten by this and not saved in a commit accessible by some other means will be lost.</p>