title: How do I ignore files in a directory in Git?
body: <p>What is the proper syntax for the <code>.gitignore</code> file to ignore files in a directory?</p>
  
  <p>Would it be</p>
  
  <pre><code>config/databases.yml
  cache/*
  log/*
  data/sql/*
  lib/filter/base/*
  lib/form/base/*
  lib/model/map/*
  lib/model/om/*
  </code></pre>
  
  <p>or</p>
  
  <pre><code>/config/databases.yml
  /cache/*
  /log/*
  /data/sql/*
  /lib/filter/base/*
  /lib/form/base/*
  /lib/model/map/*
  /lib/model/om/*
  </code></pre>
  
  <p>?</p>