Git push: to a remote repository

0 votes
added Aug 9, 2017 in Git by anonymous
edited May 10, 2019 by LC Marshal

Use git push to push commits made on local branch to a remote repository.

The git push command takes two arguments:

  • A remote name, for example, origin
  • A branch name, for example, master



As an example, you usually run git push origin master to push your local changes to your remote repository.

1 Response

0 votes
responded Mar 29, 2019 by LC Marshal Captain (25,790 points)
//for single branch
git push --set-upstream origin <yourlocalbranchname>

//for multiple branches, simply add more branch n the end
git push --set-upstream origin <yourlocalbranchname> <yourlocalbranchname2> - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.