Skip to main content

Pushing Local Changes to Remote Repository

When a branch in your local repository has had new changes made, you need to sync those changes back to the remote repository so that others can see the work done. This can be done with the push sub command, which takes all commits made locally onto a branch, and adds them to the same branch in the remote repository. To use the push sub command you first specify the remote repository to push to (usually "origin", which will be used for this example), and then the branch you want to add commits from. It would look something like this:

git push origin branch-name