title: Git checkout - detached head issue
body: <p>I know this has been discussed quite a lot here. I am absolutely new to git and its branching complexity. Although I went though several threads I am not comfortable with the terminologies used in them. So I am looking for some easy to understand step by step help on this. I have tried to explain the actual scenario I have and what I am looking for.</p>
  
  <p>I have a a branch called <code>css-merge-2016</code> where I was pushing my commits since last few days. Now I need to revert back to a specific commit. I don't want to keep any changes I made in my working directory either. If everything comes back to where I was before the specific commit that would serve my purpose.</p>
  
  <p>I did <code>git checkout &lt;commit_number&gt;</code>, which shows me I am on a <code>DETACHED HEAD</code>. Then I entered the <code>git checkout css-merge-2016</code>, which is the branch I am using to push my changes. But when I run git branch it is still showing the following:</p>
  
  <blockquote>
    <p>subrara@subrara-desktop:/var/www/localsite.com/local.main.drupal$ git branch<br>
    * (detached from f996a78)<br>
      css-merge-2016<br>
      master</p>
  </blockquote>
  
  <p>I checked again with <code>git checkout &lt;commitnumber&gt;</code> which is not showing me the <code>DETACHED HEAD</code> message any more but saying</p>
  
  <blockquote>
    <p>HEAD is now at f996a78... Removed unused SCSS file from customtheme/sass/pages Deleted file: pages > _home.scss Rules are merged down to base/sass/all/pages/_home.scss</p>
  </blockquote>
  
  <p>I need all commits I did after <code>f996a78</code> get discarded and my local repo gets back to <code>f996a78</code>. Is this at all possible? If yes, how? Please suggest. I am completely stuck!</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>If I run <code>git status</code> at this stage I can see </p>
  
  <blockquote>
    <p>HEAD detached at f996a78<br>
    Changes not staged for commit:<br>
      (use "git add/rm ..." to update what will be committed)<br>
      (use "git checkout -- ..." to discard changes in working directory)</p>
  </blockquote>
  
  <p>and then a long list of red colored file list of which some are marked as <code>modified</code> and some as <code>deleted</code>.</p>