Push

A remote is just another repository — usually one on a server that everybody shares. This one is called origin, and it is drawn as its own graph above yours.

Push uploads your commits to it and moves origin's branch to match yours.

The dimmed origin/main in your own graph is a remote-tracking ref: your repository's memory of where origin was last time you spoke to it. It is not a branch you can commit to.

Exercises

  1. Exercise 1. You have committed locally but origin is a commit behind. Push your work.
  2. Exercise 2. You are on "feature", which origin has never heard of. Push it — git creates the branch over there and starts tracking it.