title: npm ENOSELF error - installing a package in its gh-pages branch
body: <p>I'd like to write some documentation for a JS Lib on GitHub, using the Lib itself. I created an empty branch called <code>gh-pages</code> and started building the documentation pages. Now I need to write some Javascript using the Lib I'm documenting, because who wouldn't use their own Library. I tried installing it via <code>npm install</code> but obviously got this error:</p>
  
  <pre><code>npm ERR! code ENOSELF
  npm ERR! Refusing to install package with name "package" under a package
  npm ERR! also called "package". Did you name your project the same
  npm ERR! as the dependency you're installing?
  npm ERR!
  npm ERR! For more information, see:
  npm ERR!     &lt;https://docs.npmjs.com/cli/install#limitations-of-npms-install-algorithm&gt;
  </code></pre>
  
  <p>So how do I get my codebase into my <code>gh-pages</code>-branch <strong>without</strong> copying it from the master branch? I do not want to maintain the same codebase in two different branches.</p>