seed: curriculum content
This commit is contained in:
43
1.solar-system/1.welcome/16.the-pusher/index.md
Normal file
43
1.solar-system/1.welcome/16.the-pusher/index.md
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
type: challenge
|
||||
title: "The Pusher"
|
||||
xp: 100
|
||||
duration: 30
|
||||
difficulty: 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`
|
||||
Reference in New Issue
Block a user