Local has two branches A and b,a are release versions, B is the development version. According to the truth, a branch of the content is generally can not be arbitrarily changed, we just develop branch B on the line. Finish it again.
But today, I have a problem, that is, I did a move under branch B, GIT push origin A, very egg pain, it should be GIT push Origin B. And is my first reaction is that will not
The current branch, the B branch, is pushed to the remote a branch, so that's a hassle.
In fact, later found that I was paranoid, look at the following:
The original command format is this,
$ git push < remote host name > < local branch name >:< Remote Branch name >
But if I write git push Origin A, I omit the name of the remote branch, although I am under the B branch, but my command means to push the local a branch to the remote a branch.
The above command indicates that the local a branch is pushed to a branch of the Origin host. If the latter does not exist, it will be created.
$ GIT push origin master
$ GIT push origin test:master//submit local Test branch as remote Master Branch
$ GIT push origin test:test//submit local test branch as remote Test branch
I worry about this, a little ado about the taste, generally will not do so, generally not in a branch down to push the B branch such practices. At least, for security reasons, this is not recommended.
So I think it would be better if you could git push origin. But unfortunately I did not seem to have tried.