Files
curriculum/1.solar-system/1.welcome/16.the-pusher/index.md

1.0 KiB

type, title, xp, duration, difficulty
type title xp duration difficulty
challenge The Pusher 100 30 3

The Pusher

[INCOMING — Mission Control, Earth]

Cadet, your commits live only on your machine until you push them somewhere shared. That's how teams work.

When your script runs, you'll find:

  • local-repo/ — a working repo with two commits already, identity set
  • remote.git/ — an empty bare repo (your shared destination)

Two commands:

  • git remote add <name> <path> — register a remote and give it a short name (by convention, origin)
  • git push -u <remote> <branch> — send your branch's commits to that remote (-u sets it as default for next time)

Wire local-repo to remote.git and push.

[END TRANSMISSION]

Your Task

In starter/starter.sh:

  1. cd local-repo
  2. Add ../remote.git as a remote named origin
  3. Push main to origin with -u

Objectives

  • local-repo has a remote origin configured
  • remote.git has the same commits on main as local-repo