title: How to restore files deleted with "git rm *"?
body: <p>Accidentally i  deleted all files after 1st commit on local repo using <code>git rm *</code> . </p>
  
  <p>Git commit </p>
  
  <pre><code>git commit -m 'IF ELSE'
  [master fc9895a] IF ELSE
   14 files changed, 3234 insertions(+)
   create mode 100644 Lecture 03 - Bootstrapping.ppt
   create mode 100644 Makefile
   create mode 100644 codegenerator.cpp
   create mode 100644 error.cpp
   create mode 100644 error.h
   create mode 100644 includelex.h
   create mode 100644 includeyacc.h
   create mode 100644 lexrule.l
   create mode 100644 rule.tab.c
   create mode 100644 stable.h
   create mode 100644 symboletable.cpp
   create mode 100644 test.c
   create mode 100644 yaccrule.y
   create mode 100644 yaccrule2.y
  
  git rm *
  rm 'Lecture 03 - Bootstrapping.ppt'
  rm 'Makefile'
  rm 'README.md'
  rm 'codegenerator.cpp'
  rm 'error.cpp'
  rm 'error.h'
  rm 'includelex.h'
  rm 'includeyacc.h'
  rm 'lexrule.l'
  rm 'rule.tab.c'
  rm 'stable.h'
  rm 'symboletable.cpp'
  rm 'test.c'
  rm 'yaccrule.y'
  </code></pre>
  
  <p>Sequence of commands that i used to restore .</p>
  
  <pre><code>git status
  On branch master
  Your branch is ahead of 'origin/master' by 1 commit.
    (use "git push" to publish your local commits)
  Changes to be committed:
    (use "git reset HEAD &lt;file&gt;..." to unstage)
  
      deleted:    Lecture 03 - Bootstrapping.ppt
      deleted:    Makefile
      deleted:    README.md
      deleted:    codegenerator.cpp
      deleted:    error.cpp
      deleted:    error.h
      deleted:    includelex.h
      deleted:    includeyacc.h
      deleted:    lexrule.l
      deleted:    rule.tab.c
      deleted:    stable.h
      deleted:    symboletable.cpp
      deleted:    test.c
      deleted:    yaccrule.y
      deleted:    yaccrule2.y
  
  Untracked files:
    (use "git add &lt;file&gt;..." to include in what will be committed)
  
      .hg/
  </code></pre>
  
  <p><br/></p>
  
  <pre><code>git reset --hard HEAD^1
  HEAD is now at 9b72b0c first commit
  </code></pre>
  
  <p><br/></p>
  
  <pre><code>git reset --hard HEAD
  HEAD is now at 9b72b0c first commit
  </code></pre>
  
  <p><br/></p>
  
  <pre><code> git checkout
   Your branch is up-to-date with 'origin/master'.
  </code></pre>
  
  <p><br/></p>
  
  <pre><code> git reset HEAD test.c
   git reset HEAD  Makefile
   git reset HEAD --  Makefile
  
  git status
  On branch master
  Your branch is up-to-date with 'origin/master'.
  Untracked files:
    (use "git add &lt;file&gt;..." to include in what will be committed)
  
      .hg/
  </code></pre>
  
  <p>I am unable to restore file on Ubuntu 14.10 ,git version 2.1.0 .
  Is there a way so that i can restore file?</p>