title: How do I move unpushed committed code to another branch?
body: <p>So I have the following situation:</p>
  <p>I committed some work locally, without pushing to the remote repository. I want to move this local code to another branch, because if I pull, there will be modifications that will ruin all the work I put locally.</p>
  <p>This is the output of <code>git status</code> on the old branch:</p>
  <pre><code>On branch &lt;branch_name&gt;
  Your branch is ahead of 'origin/&lt;branch_name&gt;' by 1 commit.
    (use &quot;git push&quot; to publish your local commits)
  nothing to commit, working directory clean
  </code></pre>
  <p>And this is the output of <code>git status</code> on the newly created branch:</p>
  <pre><code>On branch &lt;branch_name&gt;
  nothing to commit, working directory clean
  </code></pre>