Changing the default push behavior

suggest change

Current 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.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents