title: How can I revert multiple Git commits (already pushed) to a published repository?
body: <p>New to git, and already messing up.</p>
  
  <p>I've commited and pushed some changes to a remote dev machine.
  I need to recover an older version, but keep the "bad progress" doing so far to keep working on a separate branch;</p>
  
  <p>I was thinking doing it like this:</p>
  
  <ol>
  <li><strong>Create a local branch</strong> named: "tested-thing"</li>
  <li><strong>Revert local repository</strong> to the state where it worked <em>(hopefully meaningful commits will help)</em>;</li>
  <li><p><strong>Push to remote</strong></p></li>
  <li><p><em>finish tests on tested-thing</em> </p></li>
  <li><strong>Merge</strong> "tested-thing" <strong>into dev</strong></li>
  <li><strong>Push to remote</strong></li>
  </ol>
  
  <p>Between steps 3 and 5 other developers may commit and push, and I'm afraid this may result on a "merge tragedy" - Anyway, may this be a proper way to go ?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p><strong>The main problem here resides on 2)</strong></p>
  
  <p>Here, on topic: "breaking work into a topic branch"
  <a href="http://learn.github.com/p/undoing.html">http://learn.github.com/p/undoing.html</a></p>
  
  <p>They suggest:</p>
  
  <ol>
  <li>$ git branch test</li>
  <li>$ git reset --hard a6b4c974</li>
  </ol>
  
  <p>By doing so, other developers could still:</p>
  
  <p><code>$ git commit</code> (on the dev branch)</p>
  
  <p>and I can <strong>checkout to test</strong> and work it out until <strong>merge</strong> time.</p>
  
  <p>Despite all your options, this feels like to be a nice approach to follow. 
  However, it's not stated if this can be done after we have pushed ?</p>
  
  <p>Please note the following: <em>Since I made those changes and I mess up the all thing, <strong>no one else have worked on the repository so far</strong>. So, if I revert the working directory, no one will notice.</em></p>