title: Excluding a directory from Jekyll watch
body: <p>I'm using Jekyll 3.1.1 to generate a blog and I recently introduced a Git hook to automatically publish changes pre-push.</p>
  
  <p>After introducing this hook, I have started getting the following error when I run <code>jekyll serve</code>:</p>
  
  <pre><code>Configuration file: /Users/egillespie/Projects/blog.givingjar.org/_config.yml
              Source: /Users/egillespie/Projects/blog.givingjar.org
         Destination: /Users/egillespie/Projects/blog.givingjar.org/_site
   Incremental build: disabled. Enable with --incremental
        Generating... 
                      done in 0.223 seconds.
          ** ERROR: directory is already being watched! **
  
          Directory: /Users/egillespie/Projects/blog.givingjar.org/node_modules/git-scripts/bin/hooks
  
          is already being watched through: /Users/egillespie/Projects/blog.givingjar.org/node_modules/git-scripts/bin/hooks
  
          MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors
   Auto-regeneration: enabled for '/Users/egillespie/Projects/blog.givingjar.org'
  Configuration file: /Users/egillespie/Projects/blog.givingjar.org/_config.yml
      Server address: http://127.0.0.1:4000/
    Server running... press ctrl-c to stop.
  </code></pre>
  
  <p>What's peculiar is that I am excluding <code>node_modules</code> in <code>_config.yml</code>:</p>
  
  <pre><code>exclude:
    - Gemfile
    - Gemfile.lock
    - LICENSE
    - README.md
    - package.json
    - Gruntfile.js
    - node_modules
  </code></pre>
  
  <p><code>node_modules</code> is correctly being excluded from building (i.e. there is no <code>node_modules</code> subdirectory in <code>_site</code>).</p>
  
  <p>I'm also excluding <code>node_modules</code> in <code>.gitignore</code>:</p>
  
  <pre><code># project
  node_modules
  _site*
  .sass-cache
  .jekyll-metadata
  
  # general
  .DS_Store
  Thumbs.db
  ehthumbs.db
  </code></pre>
  
  <p>Based on <a href="https://github.com/jekyll/jekyll/issues/2541" rel="noreferrer">this GitHub issue</a> and <a href="https://github.com/jekyll/jekyll-watch/commit/09cfdcb60749b306dd2015d0820dadacfbefdaf9" rel="noreferrer">this commit</a> it seems like <code>node_modules</code> should be excluded from the watch, but it's not. I can't decipher from the documentation if there's another way to exclude files from the watch.</p>
  
  <p>What is the proper way for me to exclude a directory from the watch and avoid the error described above?</p>