Simplify first remote level

This commit is contained in:
blinry 2021-02-18 17:29:48 +01:00
parent 8986900c3d
commit 5e68451a43
2 changed files with 191 additions and 196 deletions

View file

@ -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

View file

@ -1,182 +1,182 @@
[ [
{ {
"id": "init", "id": "init",
"command": "git init", "command": "git init",
"description": "Drag this card into the empty space above to initialize the time machine!" "description": "Drag this card into the empty space above to initialize the time machine!"
}, },
{ {
"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",
"command": "git config --global user.name [string]", "command": "git config --global user.name [string]",
"description": "Set your name.\n\n(Will not change anything outside of this game.)" "description": "Set your name.\n\n(Will not change anything outside of this game.)"
}, },
{ {
"id": "config-email", "id": "config-email",
"command": "git config --global user.email [string]", "command": "git config --global user.email [string]",
"description": "Set your email address." "description": "Set your email address."
}, },
{ {
"id": "checkout", "id": "checkout",
"command": "git checkout [commit, ref]", "command": "git checkout [commit, ref]",
"description": "Drag this card to a commit or to a branch to travel to it!" "description": "Drag this card to a commit or to a branch to travel to it!"
}, },
{ {
"id": "checkout-file", "id": "checkout-file",
"command": "git checkout [file]", "command": "git checkout [file]",
"description": "Reset changes in a local file." "description": "Reset changes in a local file."
}, },
{ {
"id": "checkout-from", "id": "checkout-from",
"command": "git checkout [commit, ref] [file]", "command": "git checkout [commit, ref] [file]",
"description": "Get the file contents from the specified commits, and reset both the working directory, as well as the index, to it." "description": "Get the file contents from the specified commits, and reset both the working directory, as well as the index, to it."
}, },
{ {
"id": "commit-a", "id": "commit-a",
"command": "git commit -a", "command": "git commit -a",
"description": "Make a new commit, after automatically adding all changes to the index.\nYou'll be asked to enter a short description of what you changed." "description": "Make a new commit, after automatically adding all changes to the index.\nYou'll be asked to enter a short description of what you changed."
}, },
{ {
"id": "commit-auto", "id": "commit-auto",
"command": "git add .; git commit -m \"New commit\"", "command": "git add .; git commit -m \"New commit\"",
"description": "Make a new commit containing your current environment!" "description": "Make a new commit containing your current environment!"
}, },
{ {
"id": "merge", "id": "merge",
"command": "git merge [commit, ref]", "command": "git merge [commit, ref]",
"description": "Merge the specified timeline into yours. If necessary, will create a merge commit." "description": "Merge the specified timeline into yours. If necessary, will create a merge commit."
}, },
{ {
"id": "merge-abort", "id": "merge-abort",
"command": "git merge --abort", "command": "git merge --abort",
"description": "Abort the current merge attempt, and reconstruct the previous state." "description": "Abort the current merge attempt, and reconstruct the previous state."
}, },
{ {
"id": "rebase", "id": "rebase",
"command": "git rebase [commit]", "command": "git rebase [commit]",
"description": "Put the events in your current timeline on top of the specified one." "description": "Put the events in your current timeline on top of the specified one."
}, },
{ {
"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",
"command": "git rebase -i [commit]", "command": "git rebase -i [commit]",
"description": "Make changes to the events in your current timeline, back to the commit you drag this to." "description": "Make changes to the events in your current timeline, back to the commit you drag this to."
}, },
{ {
"id": "rebase-continue", "id": "rebase-continue",
"command": "git rebase --continue", "command": "git rebase --continue",
"description": "Continue the current rebasing process." "description": "Continue the current rebasing process."
}, },
{ {
"id": "reset-hard", "id": "reset-hard",
"command": "git reset --hard [commit]", "command": "git reset --hard [commit]",
"description": "Move the branch you're on to the specified commit." "description": "Move the branch you're on to the specified commit."
}, },
{ {
"id": "reset", "id": "reset",
"command": "git reset [commit]", "command": "git reset [commit]",
"description": "Jump to the commit, and update the index. Keep the current environment." "description": "Jump to the commit, and update the index. Keep the current environment."
}, },
{ {
"id": "reset-file", "id": "reset-file",
"command": "git reset [file]", "command": "git reset [file]",
"description": "Reset the index version of a file to the version in the commit you're on." "description": "Reset the index version of a file to the version in the commit you're on."
}, },
{ {
"id": "cherry-pick", "id": "cherry-pick",
"command": "git cherry-pick [commit]", "command": "git cherry-pick [commit]",
"description": "Repeat the specified action on top of your current timeline." "description": "Repeat the specified action on top of your current timeline."
}, },
{ {
"id": "revert", "id": "revert",
"command": "git revert [commit]", "command": "git revert [commit]",
"description": "Make a new commit that reverts the changes of the speicified commit." "description": "Make a new commit that reverts the changes of the speicified commit."
}, },
{ {
"id": "bisect-start", "id": "bisect-start",
"command": "git bisect start", "command": "git bisect start",
"description": "Start looking for the commit where things got bad." "description": "Start looking for the commit where things got bad."
}, },
{ {
"id": "bisect-good", "id": "bisect-good",
"command": "git bisect good", "command": "git bisect good",
"description": "State that the current commit is good! When you're automatically transferred, keep playing the `good` and `bad` cards!" "description": "State that the current commit is good! When you're automatically transferred, keep playing the `good` and `bad` cards!"
}, },
{ {
"id": "bisect-bad", "id": "bisect-bad",
"command": "git bisect bad", "command": "git bisect bad",
"description": "State that the current commit is bad! When you're automatically transferred, keep playing the `good` and `bad` cards!" "description": "State that the current commit is bad! When you're automatically transferred, keep playing the `good` and `bad` cards!"
}, },
{ {
"id": "add", "id": "add",
"command": "git add [file]", "command": "git add [file]",
"description": "Update the index version of the file to its current real content." "description": "Update the index version of the file to its current real content."
}, },
{ {
"id": "rm", "id": "rm",
"command": "git rm [file]", "command": "git rm [file]",
"description": "Delete a file both in the working directory, as well as the index." "description": "Delete a file both in the working directory, as well as the index."
}, },
{ {
"id": "commit", "id": "commit",
"command": "git commit", "command": "git commit",
"description": "Make a commit from the current index." "description": "Make a commit from the current index."
}, },
{ {
"id": "show", "id": "show",
"command": "git show [commit]", "command": "git show [commit]",
"description": "Show what changed in the commit." "description": "Show what changed in the commit."
}, },
{ {
"id": "branch", "id": "branch",
"command": "git branch [string]", "command": "git branch [string]",
"description": "Create a new branch at your current location." "description": "Create a new branch at your current location."
}, },
{ {
"id": "branch-delete", "id": "branch-delete",
"command": "git branch -D [ref]", "command": "git branch -D [ref]",
"description": "Delete a branch." "description": "Delete a branch."
}, },
{ {
"id": "reflog", "id": "reflog",
"command": "git reflog [ref, head]", "command": "git reflog [ref, head]",
"description": "Display a log of there the ref pointed to in the past." "description": "Display a log of there the ref pointed to in the past."
}, },
{ {
"id": "file-new", "id": "file-new",
"command": "touch [string]", "command": "touch [string]",
"description": "Create a new file." "description": "Create a new file."
}, },
{ {
"id": "file-delete", "id": "file-delete",
"command": "rm [file]", "command": "rm [file]",
"description": "Delete a file." "description": "Delete a file."
}, },
{ {
"id": "file-rename", "id": "file-rename",
"command": "mv [file] [string]", "command": "mv [file] [string]",
"description": "Rename a file." "description": "Rename a file."
}, },
{ {
"id": "file-copy", "id": "file-copy",
"command": "cp [file] [string]", "command": "cp [file] [string]",
"description": "Make a copy of a file." "description": "Make a copy of a file."
} }
] ]