title: git: Your branch and 'origin/somebranch' have diverged - how to throw away local commits
body: <p>I have a question that most closely matches my problem was made, but could not add a comment.</p>
  
  <p><a href="https://stackoverflow.com/questions/19864934/git-your-branch-and-origin-master-have-diverged-how-to-throw-away-local-com">git: Your branch and &#39;origin/master&#39; have diverged - how to throw away local commits?</a></p>
  
  <p>I ran the tips and answers to the question above, but nothing decided. I am following with a progress chart using the sofwae source tree. I close the software and run the commands in the bash git. But there is the same mistake quoted.</p>
  
  <pre><code># Your branch and 'origin/master' have diverged,
  # and have 7 and 11 different commits each, respectively.
  #   (use "git pull" to merge the remote branch into yours)
  </code></pre>
  
  <p>I am also facing the same problem. follow the steps running 2 comentos but not worked. I think my problem is that before I made a checkout for a indiividual head, made a commit in individual head and then I went back to the tree branch / master, and commit that I did, I believe that references the tree head individual. In summary I can not undo this commit, I'm displayed graphically on SourceTree software</p>
  
  <p><strong>EDIT - ADD INFORMATION:</strong>
  I'd like to throw out of the unpublished commits and make server checkout. But the solutions I found an internet not working. I also tried git reverse in gitBash the console displays the message that I do deveo</p>
  
  <pre><code>$ Git status
  On branch processos_criminais_151029
  Your branch and 'origin / processos_criminais_151029' have diverged,
  and 7 and 11 have different commits each, respectivamente.
     (use "git pull" to merge the remote branch into yours)
  
  Changes not staged for commit:
     (use "git add &lt;file&gt; ..." to update what will be committed)
     (use "git checkout - &lt;file&gt; ..." to discard changes in working directory)
  </code></pre>
  
  <p>I tried the two solutions but none worked. If I try and push gives the conflict a huge amount of files, and I tried to solve these problems with the automatic merge, but to make a new git status he points out that the same quantidde files are conflicts.</p>