Directory Image
This website uses cookies to improve user experience. By using our website you consent to all cookies in accordance with our Privacy Policy.

Git – What is the difference between push.default “matching” and “simple”

Author: Fleek Solutions
by Fleek Solutions
Posted: Oct 31, 2021

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.

push.default

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

  1. nothing – do not push anything (error out) unless a refspec is explicitly given. This is primarily meant for people who want to avoid mistakes by always being explicit.
  2. current – push the current branch to update a branch with the same name on the receiving end. Works in both central and non-central workflows.
  3. upstream – push the current branch back to the branch whose changes are usually integrated into the current branch (which is called @{upstream}). This mode only makes sense if you are pushing to the same repository you would normally pull from (i.e. central workflow).
  4. simple – in centralized workflow, work like upstream with an added safety to refuse to push if the upstream branch’s name is different from the local one.
  5. matching – push all branches having the same name on both ends. This makes the repository you are pushing to remember the set of branches that will be pushed out.
  6. Fleek IT Solutions is one of the Best Software Testing companies. We offer services like Core QA, Test Automation, Mobile App Testing, Performance Testing, Accessibility Testing. Our Software Testing Company has a team of experts who always make sure that the quality of standards is matching and the cost is effective. We Can help you in making your software error-free. We provide the best Software Testing services to our customers because for us our customer matters.
  7. https://www.fleekitsolutions.com/difference-between-push-default-matching-simple/
About the Author

Fleek IT Solutions is one of the best company in the software testing. We offer a services like Core QA, Test Automation, Mobile App Testing, Performance Testing, Accessibility Testing.

Rate this Article
Leave a Comment
Author Thumbnail
I Agree:
Comment 
Pictures
Author: Fleek Solutions

Fleek Solutions

Member since: Jan 22, 2021
Published articles: 43

Related Articles