menu
Difference between push.default “matching” and “simple”
Difference between push.default “matching” and “simple”
Struggling with git push.default, not sure about difference between push.default “matching” and “simple”...

Difference between push.default “matching” and “simple”

Struggling with git push.default, not sure what is the difference between push.default “matching” and “simple”. Hope this blog will helps you out! Lets start with what is git push?

git push - can push all branches or a single one dependent on this configuration:

Configuration 1 – Push all branches

git config --global push.default matching

It will push all the branches to the remote branch and would merge them. If you don’t want to push all branches, you can push the current branch only.

Configuration 2: Push only the current branch

git config --global push.default simple

It will push branches one by one. It Mostly connected with current branch.

It will push all the branches to the remote branch and would merge them. If you don’t want to push all branches, you can push the current branch only.

Defines the action git push should take if no refspec is explicitly given. Possible values are