title: How Do I Install Specific Git Branch Using NPM?
body: <p>I am using <a href="https://github.com/SebastianM/angular-google-maps" rel="nofollow noreferrer">Angular 2 Google Maps</a> in my project. Someone created a branch that has the functionality I need. I would like to <code>npm i</code> that branch instead of master. I found a question telling me how to do it here (<a href="https://stackoverflow.com/questions/39732397/install-specific-branch-from-github-using-npm">Install specific branch from github using Npm</a>), which recommends the following format: </p>
  
  <pre><code>npm install git://github.com/shakacode/bootstrap-loader.git#v1 --save
  </code></pre>
  
  <p>So I tried:</p>
  
  <pre><code>npm i git://github.com/SebastianM/angular-google-maps.git#add-clustered-markers --save
  npm i git://github.com/SebastianM/angular-google-maps.git#inovex:add-clustered-markers --save
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>npm ERR! Command failed: git -c core.longpaths=true rev-list -n1 add-clustered-markers
  npm ERR! fatal: ambiguous argument 'add-clustered-markers': unknown revision or path not in the working tree.
  npm ERR! Use '--' to separate paths from revisions, like this:
  npm ERR! 'git &lt;command&gt; [&lt;revision&gt;...] -- [&lt;file&gt;...]'
  </code></pre>
  
  <p>The <a href="https://docs.npmjs.com/cli/install" rel="nofollow noreferrer">docs</a> don't seem to cover installing branches. From the error, it seems that I need to specify the revision number somehow, I can't find information on how to do that.</p>
  
  <p>TL;DR: How do I <code>npm i</code> a specific repo branch.</p>