Git Pushing Changing the default push behavior

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

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 will not work if the upstream branch is called something else.

git config push.default simple

Upstream pushes to the upstream branch, no matter what it is called.

git config push.default upstream

Matching pushes all branches that match on the local and the remote git config push.default upstream

After you've set the preferred style, use

git push 

to update the remote repository.



Got any Git Question?