Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>First, you create your branch locally:</p> <pre><code>git checkout -b &lt;branch-name&gt; # Create a new branch and check it out </code></pre> <p>The remote branch is automatically created when you push it to the remote server. So when you feel ready for it, you can just do:</p> <pre><code>git push &lt;remote-name&gt; &lt;branch-name&gt; </code></pre> <p>Where <code>&lt;remote-name&gt;</code> is typically <code>origin</code>, the name which git gives to the remote you cloned from. Your colleagues would then just pull that branch, and it's automatically created locally.</p> <p>Note however that formally, the format is:</p> <pre><code>git push &lt;remote-name&gt; &lt;local-branch-name&gt;:&lt;remote-branch-name&gt; </code></pre> <p>But when you omit one, it assumes both branch names are the same. Having said this, as a word of <strong>caution</strong>, do not make the critical mistake of specifying only <code>:&lt;remote-branch-name&gt;</code> (with the colon), or the remote branch will be deleted!</p> <p>So that a subsequent <code>git pull</code> will know what to do, you might instead want to use:</p> <pre><code>git push --set-upstream &lt;remote-name&gt; &lt;local-branch-name&gt; </code></pre> <p>As described below, the <code>--set-upstream</code> option sets up an upstream branch:</p> <blockquote> <p>For every branch that is up to date or successfully pushed, add upstream (tracking) reference, used by argument-less git-pull(1) and other commands.</p> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload