title: VSTS: Error encountered while pushing to the remote repository: Not a valid reference 'origin/development'
body: <p><strong>Edit - This issue seems to have (at least temporarily) resolved itself - I have no idea why and I have not changed anything to make it work - I'll update if it breaks again</strong></p>
  
  <p>I used Git-TF (<a href="https://gittf.codeplex.com/" rel="noreferrer">https://gittf.codeplex.com/</a>) to move our existing Team Foundation Version Control repo to a new Git repo (both repos in the same VSTS Project).</p>
  
  <p>It all appeared to work correctly. However now we have lots of issues.</p>
  
  <ul>
  <li>Trying to push changes from a local branch to a remote branch gets the following error: </li>
  </ul>
  
  <p><code>Error encountered while pushing to the remote repository: Not a valid reference 'origin/development'</code></p>
  
  <ul>
  <li>Using the Sync command, however, does work and pushes changes successfully to remote.</li>
  <li>Perhaps the biggest problem - we've only be able to get a Pull Request to work once. Now every Pull Request is throwing <code>405 error</code> for everything we try to do (abandon / accept - it all throws the same 405 Error)</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/ZYCA8.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ZYCA8.png" alt="enter image description here"></a></p>
  
  <p><strong>Edit: Steps Taken to setup the Git repo</strong></p>
  
  <ol>
  <li>Downloaded and installed Git and Git-tf on my local machine</li>
  <li>Cloned the TFVC repo locally via git-tf</li>
  <li>Created a new Git Repo via VSTS</li>
  <li>Set the new repo as remote on my local machine</li>
  <li>Pushed the full history to the Git Repo</li>
  </ol>
  
  <p><strong>Steps taken once the Git repo was established</strong></p>
  
  <ol>
  <li>Created a development branch from the master</li>
  <li>Checked the development branch out locally via Vis Studio</li>
  <li>Created a new local branch from the local development branch</li>
  <li>Made changes and a few commits</li>
  <li>Publish the local branch to remotes</li>
  <li>Click on "Create a Pull Request" from Vis Studio </li>
  <li>Local Source Branch: test-branch, Remote target: development - then click Create</li>
  <li>No Merge Conflicts, I review my own work and Accept - so far so good</li>
  <li>Click on Complete Pull Request, leave "delete branch after merge" selected and click Complete Merge</li>
  <li><strong>And this time it's worked...infuriatingly... The last 2 days it hasn't worked...</strong></li>
  </ol>
  
  <p>Back to square one until I can repeat the process it seems.</p>