Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

Git push: to a remote repository

0 votes
26 views
added Aug 9, 2017 in Git by Grimloxx Second Warrant Officer (3,370 points)
edited May 10 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

Example:

git push  <REMOTENAME> <BRANCHNAME> 

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 by LC Marshal Captain (23,680 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>

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...