Changing the default push behavior
suggest changeCurrent updates the branch on the remote repository that shares a name with the current working branch.
git config push.default current
Simple pushes to the upstream branch, but refuses if that upstream branch has a different name. Since Git 2.0 this is the default.
git config push.default simple
Upstream pushes to the upstream branch, no matter what it is called.
git config push.default upstream
Matching pushes every local branch that has a branch of the same name on the remote.
git config push.default matching
After you’ve set the preferred style, use
git push
to update the remote repository.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents