title: VSTS REST pushes api returns 409
body: <p>I am trying to update a file in my repo using pushes api but always get 409 response. Please advise if I do something wrong.</p>
  
  <p>Here is the request:</p>
  
  <pre><code>POST  https://{myaccount}.visualstudio.com/defaultcollection/{myteam}/_apis/git/repositories/{myrepo}/pushes?api-version=3.0 HTTP/1.1
  
  Authorization: Basic &lt;token&gt;
  Host: {myaccount}.visualstudio.com
  Content-Type: application/json
  Content-Length: 493
  
  {
    "commits": [
      {
        "Comment": "Some comment",
        "Changes": [
          {
            "Item": {
              "Path": "somepath/test.json"
            },
            "ChangeType": 1,
            "NewContent": {
              "Content": "test"
            }
          }
        ]
      }
    ],
    "refUpdates": [
      {
        "name": "refs/heads/somebranch",
        "oldObjectId": "0000000000000000000000000000000000000000"
      }
    ]
  }
  </code></pre>
  
  <p>and I got 409 response:</p>
  
  <pre><code>{"$id":"1","innerException":null,"message":"TF401028: The reference 'refs/heads/mybranch' has already been updated by another client, so you cannot update it. Please try again.","typeName":"Microsoft.TeamFoundation.Git.Server.GitReferenceStaleException, Microsoft.TeamFoundation.Git.Server","typeKey":"GitReferenceStaleException","errorCode":0,"eventId":3000}
  </code></pre>