title: TFS Git - creating branch and tag directly on remote repository
body: <p>My company switched from TFVC to TFS Git. I'm migrating a release automation tool to support the switch.</p>
  
  <p>Among other things, the tool creates a new branch for the release, as well as a new label ("tag" in Git). For TFVC, these operations are performed directly on the TFS server, and do not require a local copy of the repository. Is this still possible to achieve in Git, or would I be forced to clone the repository locally for these operations?</p>
  
  <p>The two libraries I've looked at so far are Microsoft.TeamFoundation.Git.Client which seems to be the official wrapper for TFS Git REST API, and LibGit2Sharp. I am not limited to those libraries, so another option is welcome as well.</p>
  
  <p>We are also in the process of upgrading from TFS 2015 to TFS 2017, so if there is an answer that only targets one of these I'd like to know as well.</p>
  
  <p><strong>EDIT 1</strong></p>
  
  <p>To be clear, by "directly on remote repository" I mean <strong>without passing through a local one</strong>. The tool is fully automated and if possible I'd rather not require file-system access.</p>
  
  <p><strong>EDIT 2</strong></p>
  
  <p>As <a href="https://stackoverflow.com/a/47080414/198797">mentioned below</a> by @rmcsharry it is now possible to create a tag directly on the remote server. That's a nice improvement, but of course the main goals is to first create a <em>branch</em> directly on the remote, which is definitely possible in the web UI, just not (yet?) via the API. Here's the web UI screenshot:</p>
  
  <p><a href="https://i.stack.imgur.com/0z3qE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0z3qE.png" alt="enter image description here"></a></p>
  
  <p>Without that part I cannot automate the process I mentioned without passing through the local file system, which is my goal.</p>