DEV Community

Discussion on: Remove accidentally pushed file from a git repository history in 4 simple steps

Collapse
 
moshe profile image
Moshe Zada

Hi @leo ,
Looking at git-scm.com/docs/git-config it seems like the default push.default is simple.
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.
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).

So if the branch names differ the push will be refused.

Collapse
 
leohajder profile image
Leo Hajder

Oh... Ok, this is new to me. Thanks for the clarification.