Skip to content

Home

Set default push branch name

Use the name of the current branch when pushing by default as the name of the remote branch.

git config [--global] push.default current

# Examples
git config --global push.default current

git checkout -b my-branch
git push -u
# Pushes to origin/my-branch

More like this

Start typing a keyphrase to see matching snippets.