WeCodeAcademy

Remotes and git push

A remote is a copy of your repo on another server, such as GitHub. git remote add origin <url> gives it a name (by convention origin). git push sends your commits there.

Examplebash
Open in editor »
/ $

The practice terminal does not really upload anything. On a real machine, the first push uses -u so later you can just type git push.

Quick check

What does `git push` do?

Your turn: write the code

Add a remote called origin with the URL https://github.com/you/project.git, then print how many lines git remote -v shows (fetch and push).

Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.

Tip: use the left and right arrow keys to move between lessons.