Why do I have to "git push --set-upstream origin <branch>"?
<p>I created a local branch for testing Solaris and Sun Studio. I then pushed the branch upstream. After committing a change and attempting to push the changes:</p>

<pre><code>$ git commit blake2.cpp -m "Add workaround for missing _mm_set_epi64x"
[solaris 7ad22ff] Add workaround for missing _mm_set_epi64x
 1 file changed, 5 insertions(+)
$ git push
fatal: The current branch solaris has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin solaris
</code></pre>

<p>Why do I have to do something special for this?</p>

<p>Is there any reasonable use case where someone would create <code>&lt;branch&gt;</code>, push the <code>&lt;branch&gt;</code> to remote, and then claim a commit on <code>&lt;branch&gt;</code> is not supposed to be for <code>&lt;branch&gt;</code>?</p>

<hr>

<p>I followed this question and answer on Stack Overflow: <a href="https://stackoverflow.com/a/6232535/608639">Push a new local branch to a remote Git repository and track it too</a>. I'm guessing its another instance of a incomplete or wrong accepted answer. Or, its another instance of Git taking a simple task and making it difficult.</p>

<hr>

<p>Here's the view on a different machine. The branch clearly exists, so it was created and pushed:</p>

<pre><code>$ git branch -a
  alignas
* master
  remotes/origin/HEAD -&gt; origin/master
  remotes/origin/alignas
  remotes/origin/arm-neon
  remotes/origin/det-sig
  remotes/origin/master
  remotes/origin/solaris
</code></pre>