title: yarn publish fails because dist folder is added to gitignore
body: <p>Yarn would like to add a git tag when publishing a node module. However this folder is added to gitignore. </p>
  
  <pre><code> yarn publish dist
  
  Output:
      The following paths are ignored by one of your .gitignore files:
      dist/package.json
      Use -f if you really want to add them.
      info Visit https://yarnpkg.com/en/docs/cli/publish for documentation about this command.
  </code></pre>
  
  <p>How can you keep dist in gitignore, but make an exception for yarn to be able to add the dist folder to a git commit?</p>
  
  <p>I've tried:</p>
  
  <p>-.npmignore without dist folder (-->ignored by yarn)</p>
  
  <p>-add a files array to package.json </p>
  
  <p>-anyone has other suggestions?</p>