We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Git Push

The git push command pushes (sends) local changes to any "remote" - in our case, GitHub. For example, to push our local main branch's commits to the remote origin's main branch we would run:

git push origin main

You need to be authenticated with the remote to push changes, which you should have done in the last lesson.

Alternative Options

You can also push a local branch to a remote with a different name:

git push origin <localbranch>:<remotebranch>

It's less common to do this, but nice to know.

You can also delete a remote branch by pushing an empty branch to it:

git push origin :<remotebranch>

Assignment

Let's push our local main branch to the remote origin repo for safekeeping!

Paste in the link to your repo and submit the tests.