title: How to get a branch name of the commit in VSTS Rest API?
body: <p>I'm trying to summit a build definition based on the branch of the commit. However, I cannot find anywhere related to branch information or reference information from the commit info API.</p>
  
  <p>My request looks like this</p>
  
  <pre><code>https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/git/repositories/278d5cd2-584d-4b63-824a-2ba458937249/commits/be67f8871a4d2c75f13a51c1d3c30ac0d74d4ef4?api-version=1.0
  </code></pre>
  
  <p>Response is exactly same as reference:</p>
  
  <pre><code>{
  "parents": [],
    "treeId": "7fa1a3523ffef51c525ea476bffff7d648b8cb3d",
    "push": {
      "pushedBy": {
        "id": "8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
        "displayName": "Chuck Reinhart",
        "uniqueName": "fabrikamfiber3@hotmail.com",
        "url": "https://fabrikam-fiber-inc.vssps.visualstudio.com/_apis/Identities/8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
        "imageUrl": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d"
      },
      "pushId": 1,
      "date": "2014-01-29T23:33:15.2434002Z"
    },
    "commitId": "be67f8871a4d2c75f13a51c1d3c30ac0d74d4ef4",
    "author": {
      "name": "Chuck Reinhart",
      "email": "fabrikamfiber3@hotmail.com",
      "date": "2014-01-29T23:32:09Z"
    },
    "committer": {
      "name": "Chuck Reinhart",
      "email": "fabrikamfiber3@hotmail.com",
      "date": "2014-01-29T23:32:09Z"
    },
    "comment": "First cut\n",
    "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/git/repositories/278d5cd2-584d-4b63-824a-2ba458937249/commits/be67f8871a4d2c75f13a51c1d3c30ac0d74d4ef4",
    "remoteUrl": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_git/Fabrikam-Fiber-Git/commit/be67f8871a4d2c75f13a51c1d3c30ac0d74d4ef4",
    "_links": {
      "self": {
        "href": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/git/repositories/278d5cd2-584d-4b63-824a-2ba458937249/commits/be67f8871a4d2c75f13a51c1d3c30ac0d74d4ef4"
      },
      "repository": {
        "href": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/git/repositories/278d5cd2-584d-4b63-824a-2ba458937249"
      },
      "changes": {
        "href": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/git/repositories/278d5cd2-584d-4b63-824a-2ba458937249/commits/be67f8871a4d2c75f13a51c1d3c30ac0d74d4ef4/changes"
      },
      "web": {
        "href": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_git/Fabrikam-Fiber-Git/commit/be67f8871a4d2c75f13a51c1d3c30ac0d74d4ef4"
      },
      "tree": {
        "href": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/git/repositories/278d5cd2-584d-4b63-824a-2ba458937249/trees/7fa1a3523ffef51c525ea476bffff7d648b8cb3d"
      }
    }
  }
  </code></pre>
  
  <p>How to get a branch name of the commit?</p>
  
  <h2>Reference</h2>
  
  <pre><code>https://www.visualstudio.com/en-us/docs/integrate/api/git/commits#just-the-commit 
  </code></pre>