title: How to git ignore the 'target' and it's 'site' directories and particularly entire 'site' content
body: <p><a href="https://i.stack.imgur.com/n4lgv.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/n4lgv.jpg" alt="enter image description here" /></a></p>
  <p>In my Serenity Java testing project, after the tests have been run, the target and it's sub directory 'site' will be filled with tens of files and directories to display reports and screenshots.
  Of course, I don't want to commit all those files in to git repository, and even don't want to  see them being tracked.
  I did  do this in my .ignore file which is at the top level of the project along with pom.xml as shown.</p>
  <pre><code>## Any un needed file any where in the project file structure.
  
  *.class
  
  *.tmp
  
  *.jar
  
  *.html
  
  *.png
  
  *.json
  
  *.csv
  
  *.DS_Store
  
  
  
  # any eclipse project file.
  
  .eclipse
  
  .classpath
  
  
  
  ## All the folders underneath site folder
  
  **/site
  
  site/
  
  site/*
  
  
  
  ## target folder at the top level of the project structue and paths and contents underneath it
  
  target/
  
  target/*
  
  
  
  ## target folder at any level of the project structue
  
  **/target
  
  /target 
  </code></pre>
  <p><a href="https://i.stack.imgur.com/IFgOo.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IFgOo.jpg" alt="enter image description here" /></a></p>
  <p>I am still having the files come up as being tracked...</p>