title: .gitignore is ignored by Git
body: <p>My <code>.gitignore</code> file seems to be being ignored by Git - could the <code>.gitignore</code> file be corrupt? Which file format, locale or culture does Git expect?</p>
  
  <p>My <code>.gitignore</code>:</p>
  
  <pre><code># This is a comment
  debug.log
  nbproject/
  </code></pre>
  
  <p>Output from <code>git status</code>:</p>
  
  <pre><code># On branch master
  # Your branch is ahead of 'origin/master' by 1 commit.
  #
  # Untracked files:
  #   (use "git add &lt;file&gt;..." to include in what will be committed)
  #
  #       debug.log
  #       nbproject/
  nothing added to commit but untracked files present (use "git add" to track)
  </code></pre>
  
  <p>I would like <code>debug.log</code> and <code>nbproject/</code> not to appear in the untracked files list.</p>
  
  <p>Where should I start looking to fix this?</p>