Is there a way to configure git to default push my current branch to the origin?
E.g., I want to do:
git push origin
And have it push whatever branch I've currently checked out to the upstream origin.
Is there a way to configure git to default push my current branch to the origin?
E.g., I want to do:
git push origin
And have it push whatever branch I've currently checked out to the upstream origin.
Set push.default
to tracking
.
$ git config --global push.default tracking
Now git push
pushes only the branch you're currently on, assume an upstream branch has been configured (see git branch --set-upstream
).