git push origin doesn't create the remote branch
<p>I cloned a repository to my local, made a branch, made the branch to track my local master. After changing, I committed my changes to my branch. and tried the following:</p>

<blockquote>
  <p>git push origin my-local-branch</p>
</blockquote>

<p>but when looking at my remote repo, there is no my-local-branch there and my changes have been already merged into (remote) master. Any idea why this might have happened.</p>

<p>I always do this at work. I wonder if there is some default settings at work that I don't have for myself.</p>

<p>UPDATE: This happened again. FYI, here's my chain of commands:</p>

<pre><code>git checkout -b my-local
git branch --set-upstream-to master
...
git add -A
git commit
git push origin my-local
</code></pre>

<p>Again, code was merged directly into remote master and no branch was created in remote. Then, I tried the same thing but this time without <strong>git branch --set-upstream-to master</strong>. And this actually worked! Why is this happening. It doesn't sound like an expected behaviour.</p>