title: How to use composer to install part of a git repository?
body: <p>I want to require only a sub portion of a git repository (instead of the full thing). The reason i want to do this is because the repository is huge. </p>
  
  <p>In my case the repository is: <a href="https://github.com/pubnub/pubnub-api.git" rel="noreferrer">https://github.com/pubnub/pubnub-api.git</a> and I only want the /php directory. </p>
  
  <p>I have the following package defined in composer: </p>
  
  <pre><code>   {
              "type": "package",
              "package": {
                  "name": "pubnub",
                  "version": "dev-master",
                  "source" : {
                      "url": "https://github.com/pubnub/pubnub-api.git",
                      "type": "git",
                      "reference":"master"
                  }
              }
      },
  </code></pre>
  
  <p>Any tips?</p>