title: create a temporary branch name with git
body: <p>Slightly related to <a href="https://stackoverflow.com/questions/15067561/git-create-temporary-integration-branch">this question</a> I'd like to work with a temporary branch in a shell script.</p>
  
  <p>somewhat along the lines of :</p>
  
  <pre><code>cd $(git rev-parse --show-toplevel) &amp;&amp;
  git subtree split --prefix=some_subfolder -b temp &amp;&amp;
  git push my_remote temp:publication_branch -f
  </code></pre>
  
  <p>Now, I'm not sure what this will do if the branch <code>temp</code> already exists, in any case I don't want the result on <code>my_remote/publication_branch</code> to depend on that. And I also don't want to modify the branch <code>temp</code> (assuming I have it for something unrelated). At best, I would also do a cleanup at the end</p>
  
  <pre><code>cd $(git rev-parse --show-toplevel) &amp;&amp;
  git subtree split --prefix=some_subfolder -b temp &amp;&amp;
  git push my_remote temp:publication_branch -f
  git branch -D temp
  </code></pre>
  
  <p>So what I'm looking for is a way to create a temporary branch name that doesn't exist yet, similar to <code>mktemp</code>? Is there a git command which can create a temporary branch name?</p>