2

after commit, I meant to do git push which pushes into upstream, but did

git push origin mybranch

will it cause any change ?

user3552178
  • 2,719
  • 8
  • 40
  • 67

1 Answers1

0

Quite simply, it will push your changes to whatever repository has been set as the remote called origin.

You can show what remotes you have, and where they point using

git remote -v

When you run git push on its own, it pushes to the default remote configured for your current branch. You can use the answers to this question to find out what that is. For instance, if:

git remote show upstream

Includes the line:

mybranch     pushes to mybranch

Then git push is equivalent to git push upstream mybranch.

More commonly, the default remote will be origin anyway, so git push and git push origin mybranch will do the same thing.

IMSoP
  • 89,526
  • 13
  • 117
  • 169