657 B
657 B
title, type, language, tags, author, cover, dateModified
| title | type | language | tags | author | cover | dateModified | ||
|---|---|---|---|---|---|---|---|---|
| Set default push branch name | snippet | git |
|
chalarangelo | pink-flower | 2021-06-30T05:00:00-04:00 |
Use the name of the current branch when pushing by default as the name of the remote branch.
- Use
git config push.default currentto set the name of the remote branch to the one of the current local branch as the default. - You can use the
--globalflag 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