title: How do I ignore files with a .gitignore file?
body: <p>Always when I run <code>git status</code> some files are listed as untracked, that is how it should be. But I would like to not have them listed there everytime I run <code>git status</code>. As what I have understood, I should add those files to an <code>.gitignore</code>-file.</p>
  
  <p>In my project I have a file <code>.classpath</code> and a directory <code>.gradle/*</code> that I want to ingore.</p>
  
  <p>My <code>.gitignore</code> file looks like this:</p>
  
  <pre><code>.classpath
  .gradle/*
  </code></pre>
  
  <p>but these files are still listed as "untracked" when I run <code>git status</code>. Is there anything wrong with my <code>.gitignore</code> file or how should I fix this?</p>
  
  <hr>
  
  <p>Here is my <code>git status</code> output:</p>
  
  <pre><code>C:\myproject&gt;git status
  # On branch master
  # 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)
  #
  #       modified:   src/Test.java
  #
  # Untracked files:
  #   (use "git add &lt;file&gt;..." to include in what will be committed)
  #
  #       .classpath
  #       .gitignore
  #       .gradle/
  no changes added to commit (use "git add" and/or "git commit -a")
  </code></pre>