&gt; Now that almost works, except the `git branch; git checkout` flow is not the proper way to push changes in the working directory to the new branch. (The context of the conversation was stuff that was already being developed, presumably on the master branch.)<p>&gt; But, I mean, close enough. It&#x27;s `git stash branch &lt;newbranch&gt;` and it generates an ugly error message but it does exactly what you want it to do, so you can ignore that error message and hack away.<p>Isn&#x27;t<p><pre><code>  git checkout -b new_branch
  git commit -a
  git push
</code></pre>
what you are looking for?<p>And as for the push problem:<p>1. You aren&#x27;t going to encounter it in git when pushing a newly created branch, but yes, you then have to ssh in and check it out.<p>2. I wonder how Mercurial handles pushing to repository with uncommitted changes, does it just nuke them?