title: Git branch rename (non-master) - Atlassian Stash
body: <p>I renamed a local branch (non-master) and then wanted to rename the remote barnch (Atlassian stash hosted repository). </p>
  
  <p>But, no matter what I do the branch rename is not reflected on remote.</p>
  
  <p>This is what I did</p>
  
  <pre><code>git branch SR1234
  git checkout SR1234
  git push --set-upstream origin SR1234
  git add --all
  git commit -m "...."
  git push
  </code></pre>
  
  <p>Then renamed the 'current' branch</p>
  
  <pre><code>git branch -m SR5678
  </code></pre>
  
  <p>Then tried to rename the branch on remote</p>
  
  <pre><code>git push origin :SR1234
  $ git push origin :SR1234
  To ssh://&lt;repo&gt;.git
   - [deleted]         SR1234
  
  
  $ git push --set-upstream origin SR5678
  Total 0 (delta 0), reused 0 (delta 0)
  To ssh://&lt;repo&gt;.git
   * [new branch]      SR5678 -&gt; Sr1234
  Branch SR5678 set up to track remote branch SR1234 from origin.
  </code></pre>
  
  <p>The trouble is that on remote (hosted on atlassian stash), I see the old branch name no matter what I do. Only local, I see the new branch name.</p>
  
  <p>How can I change the remote branch name?</p>