If I create a new branch and try to push it, I am told that I have to explicitly say what the name of the upstream branch needs to be.
> git checkout -b feature/long-branch-name-I-dont-want-to-have-to-type-out
Switched to a new branch 'feature/long-branch-name-I-dont-want-to-have-to-type-out'
> git push
fatal: The current branch feature/long-branch-name-I-dont-want-to-have-to-type-out has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin feature/long-branch-name-I-dont-want-to-have-to-type-out
Is there some way to do that without having to type out the name of the upstream branch? I virtually always want it to be the same name on the server as it is locally.
Is there any way to do something like git push --set-upstream <current_branch_name>
, independent of what the current branch name happens to be?