git config push.default current
to set the name of the remote branch to the one of the current local branch as the default.--global
flag to configure this option globally.git config [--global] push.default current
git config --global push.default current git checkout -b my-branch git push -u # Pushes to origin/my-branch
Subscribe to get resources directly to your inbox. You won't receive any spam! ✌️