title: How to use grep to find all files that contain one pattern but don't have a second?
body: <p>Is there an easy way using grep (or combine with other standard command line tools) to get a list of all files which contain one pattern yet don't have a second pattern?</p>
  
  <p>In my specific case I want a list of all files that contain the pattern:</p>
  
  <pre><code>override.*commitProperties
  </code></pre>
  
  <p>yet don't contain:</p>
  
  <pre><code>super.commitProperties
  </code></pre>
  
  <p>I'm on Windows but use cygwin extensively.  I know how to either find all files with the first pattern OR all patterns without the second, but I'm not sure how to combine those queries.</p>
  
  <p>I'd prefer answers that are generic, as I have a feeling plenty of other people could find this type of query useful.  It's easy enough for me to take a generic solution and plug in my values.  I just included my specific instance to make the explanation easier.</p>