title: How do I ignore a directory in the root of my git repository, but include it further down in the tree?
body: <p>I need to use <code>.gitignore</code> to exclude a directory in the root of my repository.  However, other directories with the same name exist deeper in the directory tree, and I need those to be included.  It seems that when I put the name of the directory into <code>.gitignore</code>, it catches all of these directories, not just the one I need to ignore.  I understand that <code>.gitignore</code> is actually not a list of files, but patterns.  So how can I construct a pattern to ignore just a file in my root directory, but not files with the same name further down?</p>