问题
Is there a way to push a branch to a Git remote without checking that branch out first?
Say I am on the master branch, and there is a release branch that I want to push to the remote, is there a way to push the release branch to the Git remote without having to check it out first?
回答1:
Try this:
git push -u origin new_branch_name
来源:https://stackoverflow.com/questions/51342767/push-a-git-branch-to-remote-without-checking-the-branch-out