mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-07-21 22:44:19 +02:00
first commit for the new structure of directories of levels like as @schokotets suggestion
This commit is contained in:
parent
9caaddc06e
commit
b12d0e778f
207 changed files with 14 additions and 91 deletions
27
levels/intro/en/cli
Normal file
27
levels/intro/en/cli
Normal file
|
@ -0,0 +1,27 @@
|
|||
title = The command line
|
||||
cards =
|
||||
|
||||
[description]
|
||||
|
||||
These playing cards are designed to be easy to use and to remember! We'd suggest sticking to them if you don't have a lot of experience with Git!
|
||||
|
||||
[cli]
|
||||
|
||||
But there's another way to interact with Git:
|
||||
|
||||
Try typing `git init` into the black terminal below, and pressing the enter key!
|
||||
|
||||
[setup]
|
||||
|
||||
rm -rf .git
|
||||
|
||||
[win]
|
||||
|
||||
# Initialize the time machine!
|
||||
test -d .git
|
||||
|
||||
[congrats]
|
||||
|
||||
Cool! Instead of using the playing cards, you can also do everything via the command line!
|
||||
|
||||
The command line is pretty powerful! Often, you can use it to solve tasks faster compared to using a graphical interface.
|
33
levels/intro/en/commit
Normal file
33
levels/intro/en/commit
Normal file
|
@ -0,0 +1,33 @@
|
|||
title = Your first commit
|
||||
cards = commit-auto
|
||||
|
||||
[description]
|
||||
|
||||
You can use your time machine to make snapshots of objects around you! Here, let's practice this!
|
||||
|
||||
(Your teacher pours some water into a glass.)
|
||||
|
||||
[cli]
|
||||
|
||||
Again, instead of using the card, you can also type the commands which are printed on it into the black terminal below!
|
||||
|
||||
This is totally optional! But this will be a super useful skill in the real world - and it will give you a sparkling golden badge! :)
|
||||
|
||||
[setup]
|
||||
|
||||
echo "The glass is full of water." > glass
|
||||
|
||||
[win]
|
||||
|
||||
# Make a snapshot of the glass (a "commit")
|
||||
git rev-parse HEAD
|
||||
|
||||
# Change the contents of the glass!
|
||||
! test "$(cat glass)" = "The glass is full of water."
|
||||
|
||||
# And make a second commit!
|
||||
git rev-parse HEAD^ && ! test "$(git show main:glass)" = "The glass is full of water."
|
||||
|
||||
[congrats]
|
||||
|
||||
Nice! You can try making some additional commits. When you feel comfortable, click on "Next Level".
|
42
levels/intro/en/copies
Normal file
42
levels/intro/en/copies
Normal file
|
@ -0,0 +1,42 @@
|
|||
title = Making backups
|
||||
cards =
|
||||
|
||||
[description]
|
||||
|
||||
This time, you're making a lot of backup copies - you can look at them by clicking on them!
|
||||
|
||||
[congrats]
|
||||
|
||||
Okay, this kind of works.
|
||||
|
||||
But you're a bit worried that you'll end up with hundreds of copies of this form, and it will be hard to keep track of all of them.
|
||||
|
||||
And especially when working with other people, sending copies back and forth doesn't seem ideal.
|
||||
|
||||
You can't wait to try these time machines!
|
||||
|
||||
[setup]
|
||||
|
||||
rm -rf .git
|
||||
|
||||
echo "~ Why I want to learn Git ~
|
||||
|
||||
(I still need to write this.)" >> form.txt
|
||||
|
||||
|
||||
echo "~ Why I want to learn Git ~
|
||||
|
||||
- So that I can undo mistakes" >> form2.txt
|
||||
|
||||
|
||||
echo "~ Why I want to learn Git ~
|
||||
|
||||
- So that I can undo mistakes
|
||||
- To track my projects over time" >> form2_final.txt
|
||||
|
||||
cp form2_final.txt form2_really_final.txt
|
||||
|
||||
[win]
|
||||
|
||||
# Add another line to form2_really_final.txt!
|
||||
test "$(cat form2_really_final.txt | wc -l )" -ge 5
|
23
levels/intro/en/init
Normal file
23
levels/intro/en/init
Normal file
|
@ -0,0 +1,23 @@
|
|||
title = Enter the time machine
|
||||
cards = init
|
||||
|
||||
[description]
|
||||
|
||||
You've been accepted to time travel school! Yay! It's your first day! Your teacher explains:
|
||||
|
||||
"To do anything with a time machine, you first need to initialize it!"
|
||||
|
||||
Drag that blue card up to play it!
|
||||
|
||||
[setup]
|
||||
|
||||
rm -rf .git
|
||||
|
||||
[win]
|
||||
|
||||
# Initialize the time machine!
|
||||
test -d .git
|
||||
|
||||
[congrats]
|
||||
|
||||
Nice! See that little owl squirrel that appeared? It will be your companion, and always show you where you are in time!
|
52
levels/intro/en/remote
Normal file
52
levels/intro/en/remote
Normal file
|
@ -0,0 +1,52 @@
|
|||
title = Working together
|
||||
cards = pull commit-auto push
|
||||
|
||||
[description]
|
||||
|
||||
Let's add your name to our list of students!
|
||||
|
||||
I already have a second commit of it in my time machine - let's work together!
|
||||
|
||||
[cli]
|
||||
|
||||
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.
|
||||
|
||||
[congrats]
|
||||
|
||||
Welcome to time travel school! :) I'll see you for your first class tomorrow!
|
||||
|
||||
[setup]
|
||||
|
||||
echo "~ List of current students ~" > students
|
||||
git add .
|
||||
git commit -m "Initial version"
|
||||
git push -u teacher main
|
||||
|
||||
git update-ref -d refs/remotes/teacher/main
|
||||
|
||||
[setup teacher]
|
||||
|
||||
git reset --hard main
|
||||
|
||||
echo "
|
||||
- Sam
|
||||
- Alex" >> students
|
||||
|
||||
git add .
|
||||
git commit -m "Added two students"
|
||||
|
||||
[win]
|
||||
|
||||
# Get the second commit from your teacher using `git pull`.
|
||||
test "$(git log --oneline teacher/main | wc -l)" -ge 2
|
||||
|
||||
# Add your name to the list of students
|
||||
test "$(cat students |wc -l)" -ge 5
|
||||
|
||||
# Commit your result.
|
||||
test "$(git show main:students |wc -l)" -ge 5
|
||||
|
||||
[win teacher]
|
||||
|
||||
# And use `git push` to send it to your teacher!
|
||||
test "$(git show main:students |wc -l)" -ge 5
|
42
levels/intro/en/risky
Normal file
42
levels/intro/en/risky
Normal file
|
@ -0,0 +1,42 @@
|
|||
title = Living dangerously
|
||||
cards =
|
||||
|
||||
[description]
|
||||
|
||||
So you have decided to apply for time travel school, to learn how to use this time machine called "Git"!
|
||||
|
||||
How exciting!
|
||||
|
||||
You're almost done with the paperwork! You just need to fill in one more reason why you want to learn Git.
|
||||
|
||||
[congrats]
|
||||
|
||||
Suddenly, your cat jumps on the table, snatches away the form, and runs away! Oh no. All your hard work, gone!
|
||||
|
||||
You clearly need a better solution.
|
||||
|
||||
(Click "Next Level" as soon as you're ready!)
|
||||
|
||||
[setup]
|
||||
|
||||
rm -rf .git
|
||||
|
||||
echo "~ Why I want to learn Git ~
|
||||
|
||||
- So that I can undo mistakes
|
||||
- To track my projects over time" >> form.txt
|
||||
|
||||
[actions]
|
||||
|
||||
test "$(cat form.txt | wc -l )" -ge 5 && echo "(Has been stolen by your cat.)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
" > form.txt
|
||||
|
||||
[win]
|
||||
|
||||
# Add another line to form.txt!
|
||||
test "$(cat form.txt | wc -l )" -ge 5
|
38
levels/intro/en/who-are-you
Normal file
38
levels/intro/en/who-are-you
Normal file
|
@ -0,0 +1,38 @@
|
|||
title = Welcome to time travel school!
|
||||
cards = config-name commit-auto checkout
|
||||
|
||||
[description]
|
||||
|
||||
You're still pretty confused by everything that's going on. The next day, you decide to enroll in time travel school!
|
||||
|
||||
Your time travel teacher welcomes you: "Hello there! Wanna tell us your name?"
|
||||
|
||||
[setup]
|
||||
|
||||
git config --global user.name "You"
|
||||
|
||||
echo "~ Why do you want to learn how to use time machines? ~
|
||||
|
||||
[ ] To make sure that my cat doesn't eat my homework.
|
||||
[ ] So I don't have to keep copies of all my essays.
|
||||
[ ] To collaborate with other time travel students.
|
||||
[ ] Other, please specify:" > form
|
||||
|
||||
[actions]
|
||||
|
||||
test "$(git config user.name)" != "You" && cat form | grep -v Signature && echo "
|
||||
Signature: $(git config user.name)" >> form
|
||||
|
||||
[win]
|
||||
|
||||
# Introduce yourself.
|
||||
test "$(git config user.name)" != "You"
|
||||
|
||||
# Fill out the enrollment form, and commit it!
|
||||
git show main:form | grep '\[[xX]\]'
|
||||
|
||||
[congrats]
|
||||
|
||||
"We're so glad to have you!
|
||||
|
||||
Git can help you fix problems in the past! It allows you to collaborate with other students of time travel! It's really powerful, and it's really popular! I'll see you for your first lesson tomorrow!"
|
27
levels/intro/it/cli
Normal file
27
levels/intro/it/cli
Normal file
|
@ -0,0 +1,27 @@
|
|||
title = La line di comando
|
||||
cards =
|
||||
|
||||
[description]
|
||||
|
||||
Queste carte da gioco sono state disegnate per essere usate e ricordate facilmente! Ti consigliamo di attenerti a loro se non hai molta esperienza di Git!
|
||||
|
||||
[cli]
|
||||
|
||||
Ma c'è un'altra via per interagire con Git:
|
||||
|
||||
Prova a digitare `git init` nel terminale qui sotto e premere il pulsante Enter!
|
||||
|
||||
[setup]
|
||||
|
||||
rm -rf .git
|
||||
|
||||
[win]
|
||||
|
||||
# Inizializza la macchina del tempo!
|
||||
test -d .git
|
||||
|
||||
[congrats]
|
||||
|
||||
Perfetto! Al posto di usare le carte da gioco, puoi anche fare tutto dalla line di comando!
|
||||
|
||||
La line di comando e piuttosto potente! A volte, puoi usarla per risolvere le attività più velocemente che con l'interfaccia grafica.
|
32
levels/intro/it/commit
Normal file
32
levels/intro/it/commit
Normal file
|
@ -0,0 +1,32 @@
|
|||
title = Il tuo primo commit!
|
||||
cards = commit-auto
|
||||
|
||||
[description]
|
||||
|
||||
Puoi usare la tua macchina del tempo per scattare istantanee degli oggetti intorno a te! Qui puoi metterlo in pratica!
|
||||
|
||||
(Il tuo insegnante versa un pò di acqua nel bicchiere)
|
||||
|
||||
[cli]
|
||||
Nuovamente, al posto di usare le carte, puoi scrivere i comandi, che sono stampati sulle carte, nel terminale in basso!
|
||||
|
||||
Questo è totalmente opzionale! Ma questa è una conoscenza super utile nel mondo reale - e ti farà avere un distintivo scintillante! :)
|
||||
|
||||
[setup]
|
||||
|
||||
echo "Il bicchiere è pieno di acqua." > glass
|
||||
|
||||
[win]
|
||||
|
||||
# Crea un'istantanea del bicchiere (un "commit")
|
||||
git rev-parse HEAD
|
||||
|
||||
# Cambia il contenuto del bicchiere!
|
||||
! test "$(cat glass)" = "Il bicchiere è pieno di acqua."
|
||||
|
||||
# E crea un secondo "commit"!
|
||||
git rev-parse HEAD^ && ! test "$(git show main:glass)" = "Il bicchiere è bieno di acqua."
|
||||
|
||||
[congrats]
|
||||
|
||||
Perfetto! Puoi provare a creare altri "commit". Quando ti sentirai a posto, premi su "Next Level".
|
42
levels/intro/it/copies
Normal file
42
levels/intro/it/copies
Normal file
|
@ -0,0 +1,42 @@
|
|||
title = Crea una copia
|
||||
cards =
|
||||
|
||||
[description]
|
||||
|
||||
Questa volta, stai facendo molte copie di backup - puoi guardarli cliccandoci sopra!
|
||||
|
||||
[congrats]
|
||||
|
||||
Okay, questo è un modo di lavorare.
|
||||
|
||||
Ma sei preoccupato che ti ritroverai con centinaia di copie di questo modulo e sarà difficile tenerne traccia nel tempo.
|
||||
|
||||
Specialmente quando lavori con altre persone, inviare copie avanti ed indietro non sembra l'ideale.
|
||||
|
||||
Fermati, devi provare questa macchina del tempo!
|
||||
|
||||
[setup]
|
||||
|
||||
rm -rf .git
|
||||
|
||||
echo "~ Perchè voglio imparare Git ~
|
||||
|
||||
(Devo ancora scriverlo.)" >> form.txt
|
||||
|
||||
|
||||
echo "~ Perchè volgio imparare Git ~
|
||||
|
||||
- Così posso annullare gli errori" >> form2.txt
|
||||
|
||||
|
||||
echo "~ Perchè volgio imparare Git ~
|
||||
|
||||
- Così posso annullare gli errori
|
||||
- Per tracciare i mie progetti attraverso il tempo" >> form2_final.txt
|
||||
|
||||
cp form2_final.txt form2_really_final.txt
|
||||
|
||||
[win]
|
||||
|
||||
# Aggiungi una nuova line al file form2_really_final.txt!
|
||||
test "$(cat form2_really_final.txt | wc -l )" -ge 5
|
24
levels/intro/it/init
Normal file
24
levels/intro/it/init
Normal file
|
@ -0,0 +1,24 @@
|
|||
title = Entra nella machina del tempo
|
||||
cards = init
|
||||
|
||||
[description]
|
||||
|
||||
Sei stato accettato nella scuola della macchina del tempo! Questo è il tuo primo giorno! Il tuo insegnate ti spiega:
|
||||
|
||||
"Per fare qualsiasi cosa con una macchina del tempo, devi prima inizializzarla!"
|
||||
|
||||
Trascina quella carta blu verso l'alto per usarla!
|
||||
|
||||
[setup]
|
||||
|
||||
rm -rf .git
|
||||
|
||||
[win]
|
||||
|
||||
# Inizializzazione della macchina del tempo
|
||||
test -d .git
|
||||
|
||||
[congrats]
|
||||
|
||||
Perfetto! Vedi quel piccolo animale che è apparso? Sarà il tuo compagno e ti mostrerà dove ti trovi nel tempo!
|
||||
|
52
levels/intro/it/remote
Normal file
52
levels/intro/it/remote
Normal file
|
@ -0,0 +1,52 @@
|
|||
title = Dai lavoriamo tutti assieme
|
||||
cards = pull commit-auto push
|
||||
|
||||
[description]
|
||||
|
||||
Aggiungi il tuo nome nella nostra lista di studenti!
|
||||
|
||||
Ho già un secondo "commit" nella mia macchina del tempo - Dai lavoriamo tutti assieme!
|
||||
|
||||
[cli]
|
||||
|
||||
Per tornare in dietro alle vecchie istruzioni, puoi premere la freccia in alto o in basso. In questo modo non devi digitare, nuovamente, le istruzioni.
|
||||
|
||||
[congrats]
|
||||
|
||||
Benvenuto nella scuola del viaggio nel tepo! :) Ci vediamo domani per la tua prima lezione!
|
||||
|
||||
[setup]
|
||||
|
||||
echo "~ Lista degli attuali studenti ~" > students
|
||||
git add .
|
||||
git commit -m "Versione iniziale"
|
||||
git push -u teacher main
|
||||
|
||||
git update-ref -d refs/remotes/teacher/main
|
||||
|
||||
[setup teacher]
|
||||
|
||||
git reset --hard main
|
||||
|
||||
echo "
|
||||
- Sam
|
||||
- Alex" >> students
|
||||
|
||||
git add .
|
||||
git commit -m "Aggiunti due studenti"
|
||||
|
||||
[win]
|
||||
|
||||
# Ottieni il secondo "commit" dal tuo insegnante usando `git pull`.
|
||||
test "$(git log --oneline teacher/main | wc -l)" -ge 2
|
||||
|
||||
# Aggiungi il tuo nome alla lista degli studenti.
|
||||
test "$(cat students |wc -l)" -ge 5
|
||||
|
||||
# Crea un'istantanea dei risultati.
|
||||
test "$(git show main:students |wc -l)" -ge 5
|
||||
|
||||
[win teacher]
|
||||
|
||||
# E usa `git push` per inviarlo al tuo insegnante!
|
||||
test "$(git show main:students |wc -l)" -ge 5
|
42
levels/intro/it/risky
Normal file
42
levels/intro/it/risky
Normal file
|
@ -0,0 +1,42 @@
|
|||
title = Vivere è pericoloso
|
||||
cards =
|
||||
|
||||
[description]
|
||||
|
||||
Quindi hai deciso di fare domanda per la scuola di viaggio nel tempo, per usare la macchina del tempo chiamata "Git"!
|
||||
|
||||
Che emozione!
|
||||
|
||||
Hai quasi concluso le scartoffie! Devi solamente inserire un motivo per il quale vuoi imparare Git.
|
||||
|
||||
[congrats]
|
||||
|
||||
All'improvviso, il tuo gatto salta sul tavolo, strappa via il modulo, e scappa via! Oh no. Tutto il tuo duro lavoro, andato!
|
||||
|
||||
Devi trovare una buona soluzione.
|
||||
|
||||
(Premi "Prossimo livello" appena sei pronto!)
|
||||
|
||||
[setup]
|
||||
|
||||
rm -rf .git
|
||||
|
||||
echo "~ Perchè voglio imparare Git ~
|
||||
|
||||
- Così posso cancellare gli errori
|
||||
- Per seguire il mio progetto attraverso il tempo" >> form.txt
|
||||
|
||||
[actions]
|
||||
|
||||
test "$(cat form.txt | wc -l )" -ge 5 && echo "(E' stato rubato dal tuo gatto.)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
" > form.txt
|
||||
|
||||
[win]
|
||||
|
||||
# Aggiungi un'altra line a form.txt!
|
||||
test "$(cat form.txt | wc -l )" -ge 5
|
38
levels/intro/it/who-are-you
Normal file
38
levels/intro/it/who-are-you
Normal file
|
@ -0,0 +1,38 @@
|
|||
title = Benvenuto nella scuola del viaggio nel tempo!
|
||||
cards = config-name commit-auto checkout
|
||||
|
||||
[description]
|
||||
|
||||
Sei ancora confuso da tutto quello che sta succedendo. Il giorno seguente, decidi di iscriverti nella scuola del viaggio nel tempo!
|
||||
|
||||
Il tuo insegnante del viaggio nel tempo ti saluta: "Ciao come va! Vuoi dirci il tuo nome?"
|
||||
|
||||
[setup]
|
||||
|
||||
git config --global user.name "TU"
|
||||
|
||||
echo "~ Chi vuole imparare come si usa la macchina del tempo? ~
|
||||
|
||||
[ ] Per essere sicuro che il mio gatto non mangi il mio lavoro.
|
||||
[ ] Così non devo tenere copie di tutti i miei saggi.
|
||||
[ ] Per collaborare con altri studenti del viaggio nel tempo.
|
||||
[ ] Altro, perfavore specifica:" > form
|
||||
|
||||
[actions]
|
||||
|
||||
test "$(git config user.name)" != "TU" && cat form | grep -v Signature && echo "
|
||||
Firma: $(git config user.name)" >> form
|
||||
|
||||
[win]
|
||||
|
||||
# Presentati.
|
||||
test "$(git config user.name)" != "TU"
|
||||
|
||||
# Compila l'iscrizione e inviala!
|
||||
git show main:form | grep '\[[xX]\]'
|
||||
|
||||
[congrats]
|
||||
|
||||
"Siamo lieti di averti con noi!
|
||||
|
||||
Git puoi aiutarti a correggere i problemi del passato! Ti aiuta a collaborare con gli studenti del viaggio nel tempo! E' davvero potente e e popolare! Ci vediamo domani per la tua prima lezione!"
|
6
levels/intro/sequence
Normal file
6
levels/intro/sequence
Normal file
|
@ -0,0 +1,6 @@
|
|||
risky
|
||||
copies
|
||||
init
|
||||
cli
|
||||
commit
|
||||
remote
|
Loading…
Add table
Add a link
Reference in a new issue