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:
git push origin my-local-branch
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.
I always do this at work. I wonder if there is some default settings at work that I don't have for myself.
UPDATE: This happened again. FYI, here's my chain of commands:
git checkout -b my-local
git branch --set-upstream-to master
...
git add -A
git commit
git push origin my-local
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 git branch --set-upstream-to master. And this actually worked! Why is this happening. It doesn't sound like an expected behaviour.