mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-11-03 19:04:40 +01:00
Simplify first remote level
This commit is contained in:
parent
8986900c3d
commit
5e68451a43
2 changed files with 191 additions and 196 deletions
|
@ -1,21 +1,15 @@
|
||||||
title = Working together
|
title = Working together
|
||||||
cards = clone commit-auto pull push
|
cards = pull commit-auto push
|
||||||
|
|
||||||
[description]
|
[description]
|
||||||
|
|
||||||
Let's add your name to our list of students! I already have this list my time machine - let's work together!
|
Let's add your name to our list of students!
|
||||||
|
|
||||||
Drag the "clone" card to my name to make your own copy of my timeline!
|
I already have a second commit of it in my time machine - let's work together!
|
||||||
|
|
||||||
[cli]
|
[cli]
|
||||||
|
|
||||||
To clone the teacher's repo via the command line, you need this command:
|
To go back to old commands, you can press arrow up and down. That way, you don't have to type in long commands twice.
|
||||||
|
|
||||||
git clone ../teacher .
|
|
||||||
|
|
||||||
(Don't forget the dot at the end!)
|
|
||||||
|
|
||||||
To go through old commands, you can press arrow up and down. That way, you don't have to type in long commands twice.
|
|
||||||
|
|
||||||
[congrats]
|
[congrats]
|
||||||
|
|
||||||
|
@ -23,13 +17,14 @@ Welcome to time travel school! :) I'll see you for your first class tomorrow!
|
||||||
|
|
||||||
[setup]
|
[setup]
|
||||||
|
|
||||||
rm -rf .git
|
|
||||||
|
|
||||||
[setup teacher]
|
|
||||||
|
|
||||||
echo "~ List of current students ~" > students
|
echo "~ List of current students ~" > students
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Initial version"
|
git commit -m "Initial version"
|
||||||
|
git push -u teacher main
|
||||||
|
|
||||||
|
[setup teacher]
|
||||||
|
|
||||||
|
git reset --hard main
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
- Sam
|
- Sam
|
||||||
|
@ -40,8 +35,8 @@ git commit -m "Added two students"
|
||||||
|
|
||||||
[win]
|
[win]
|
||||||
|
|
||||||
# Get a copy of your teacher's timeline using `git clone`!
|
# Get the second commit from your teacher using `git pull`.
|
||||||
test -d .git
|
test "$(git log --oneline teacher/main | wc -l)" -ge 2
|
||||||
|
|
||||||
# Add your name to the list of students
|
# Add your name to the list of students
|
||||||
test "$(cat students |wc -l)" -ge 5
|
test "$(cat students |wc -l)" -ge 5
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
{
|
{
|
||||||
"id": "clone",
|
"id": "clone",
|
||||||
"command": "git clone ../[remote] .",
|
"command": "git clone ../[remote] .",
|
||||||
"description": "Create your own copy of your friend's repo."
|
"description": "Create your own copy of someone else's repo."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "config-name",
|
"id": "config-name",
|
||||||
|
@ -62,17 +62,17 @@
|
||||||
{
|
{
|
||||||
"id": "pull",
|
"id": "pull",
|
||||||
"command": "git pull",
|
"command": "git pull",
|
||||||
"description": "Get a friend's version of the current timeline, and try to merge it into yours."
|
"description": "Get someone else's version of the current timeline, and try to merge it into yours."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "fetch",
|
"id": "fetch",
|
||||||
"command": "git fetch [remote]",
|
"command": "git fetch [remote]",
|
||||||
"description": "Get a friend's version of the current timeline."
|
"description": "Get a someone else's version of the current timeline."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "push",
|
"id": "push",
|
||||||
"command": "git push",
|
"command": "git push",
|
||||||
"description": "Give the current timeline to a friend."
|
"description": "Give the current timeline to someone else."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "rebase-interactive",
|
"id": "rebase-interactive",
|
||||||
|
|
Loading…
Reference in a new issue