Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><code>git push</code> doesn't push all of your local branches: how would it know which remote branches to push them to? It only pushes local branches which have been configured to push to a particular remote branch.</p> <p>On my version of Git (1.6.5.3), when I run <code>git remote show origin</code> it actually prints out which branches are configured for push:</p> <pre><code>Local refs configured for 'git push': master pushes to master (up to date) quux pushes to quux (fast forwardable) </code></pre> <p><strong>Q. But I could push to <code>master</code> without worrying about all this!</strong></p> <p>When you <code>git clone</code>, by default it sets up your local <code>master</code> branch to push to the remote's <code>master</code> branch (locally referred to as <code>origin/master</code>), so if you only commit on <code>master</code>, then a simple <code>git push</code> will always push your changes back.</p> <p>However, from the output snippet you posted, you're on a branch called <code>develop</code>, which I'm guessing hasn't been set up to push to anything. So <code>git push</code> without arguments won't push commits on that branch.</p> <p>When it says "Everything up-to-date", it means "all the branches you've told me how to push are up to date".</p> <p><strong>Q. So how can I push my commits?</strong></p> <p>If what you want to do is put your changes from <code>develop</code> into <code>origin/master</code>, then you should probably merge them into your local <code>master</code> then push that:</p> <pre><code>git checkout master git merge develop git push # will push 'master' </code></pre> <p>If what you want is to create a <code>develop</code> branch on the remote, separate from <code>master</code>, then supply arguments to <code>git push</code>:</p> <pre><code>git push origin develop </code></pre> <p>That will: create a new branch on the remote called <code>develop</code>; <em>and</em> bring that branch up to date with your local <code>develop</code> branch; <em>and</em> set <code>develop</code> to push to <code>origin/develop</code> so that in future, <code>git push</code> without arguments <em>will</em> push <code>develop</code> automatically.</p> <p>If you want to push your local <code>develop</code> to a remote branch called something <em>other than</em> <code>develop</code>, then you can say:</p> <pre><code>git push origin develop:something-else </code></pre> <p>However, that form <em>won't</em> set up <code>develop</code> to always push to <code>origin/something-else</code> in future; it's a one-shot operation.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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