git push vs git push origin

The first push should be a:

git push -u origin branchname

That would make sure:

  • your local branch has a remote tracking branch of the same name referring an upstream branch in your remote repo ‘origin‘,
  • this is compliant with the default push policy ‘simple

Any future git push will, with that default policy, only push the current branch, and only if that branch has an upstream branch with the same name.
that avoid pushing all matching branches (previous default policy), where tons of test branches were pushed even though they aren’t ready to be visible on the upstream repo.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)