Some levels translations

This commit is contained in:
Luca Canali 2021-09-17 11:40:31 +02:00
parent b9fc323a58
commit 6e0661b662
7 changed files with 127 additions and 126 deletions

View file

@ -3,84 +3,84 @@ cards = checkout commit-auto reset-hard rebase
[description]
Okay - turns out that saving time in the morning by utilizing parallel universes is against the regulations of the International Time Travel Association. You'll have to do your tasks in sequence after all.
Okay - Viene vuori che risparmiare tempo al mattino utilizzando universi paralleli è contro i regolamenti dell'International Time Travel Association. Dopotutto, dovrai svolgere i tuoi compiti in sequenza.
See the "rebase" card? When you drag it to a commit, it will copy the events in your current timeline after the specified one! This way, make a clean, linear timeline where you visit all three shops.
Vedi la carta "rebase"? Quando la sposti su un commit, copierà gli eventi della tua corrente linea temporale dopo quello specificato! In questo modo crei una linea temporale chiara e pulita dove visiti tutti e tre i negozzi.
Again, we want to make that our base reality - the "main" branch should point to that timeline!
Nuovamente, vogliamo rendere questa la nostra realtà di base - il ramo "main" dovrebbe puntare a quella linea temporale!
[setup]
echo "You do not have a baguette.
echo "Non hai una baguette.
You do not have coffee.
Non hai caffe.
You do not have a donut." > you
Non hai una ciambella." > you
git add .
git commit -m "The Beginning"
git commit -m "L'inizio"
git checkout -b baguette main
echo "You have a baguette.
echo "Hai una baguette.
You do not have coffee.
Non hai caffe.
You do not have a donut." > you
Non hai una ciambella." > you
git add .
git commit -m "You buy a baguette"
git commit -m "Compri una baguette"
echo "You ate a baguette.
echo "Mangi una baguette.
You do not have coffee.
Non hai caffe.
You do not have a donut." > you
Non hai una ciambella." > you
git add .
git commit -m "You eat the baguette"
git commit -m "Mangi la baguette"
git checkout -b coffee main
echo "You do not have a baguette.
echo "Non hai una baguette.
You have coffee.
Hai del caffe.
You do not have a donut." > you
Non hai una ciambella." > you
git add .
git commit -m "You buy some coffee"
git commit -m "Compri un pò di caffe"
echo "You do not have a baguette.
echo "Non hai una baguette.
You drank coffee.
Hai bevuto caffe.
You do not have a donut." > you
Non hai una ciambella." > you
git add .
git commit -m "You drink the coffee"
git commit -m "Bevi il caffe"
git checkout -b donut main
echo "You do not have a baguette.
echo "Non hai una baguette
You do not have coffee.
Non hai caffe.
You have a donut." > you
Hai una ciamebella." > you
git add .
git commit -m "You buy a donut"
git commit -m "Compri una ciambella"
echo "You do not have a baguette.
echo "Non hai una baguette.
You do not have coffee.
Non hai caffe.
You ate a donut." > you
Mangi una ciambella." > you
git add .
git commit -m "You eat the donut"
git commit -m "Mangi la ciambella"
git checkout --detach main
[win]
# Order all tree branches into one and move the main branch ref
{ git show main:you | grep "You ate.*baguette"; } && { git show main:you | grep "You drank.*coffee"; } && { git show main:you | grep "You ate.*donut"; } && { test "$(git log main --oneline | wc -l)" -eq 7; }
# Ordina le tre ramificazioni in una e muovi il riferimento al ramo principale
{ git show main:you | grep "Mangi.*baguette"; } && { git show main:you | grep "Bevuto.*caffe"; } && { git show main:you | grep "Mangi.*ciambella"; } && { test "$(git log main --oneline | wc -l)" -eq 7; }
[congrats]
Notice how the other timelines and commits are still there - if anything goes wrong, you can also travel back to them.
Nota come gli altri commit e linee temporali siano ancora li - se qualcosa va storto, puoi ancora tornare in dietro.
It's really hard to actually *destroy* stuff with your time machine.
E' davvero difficile *distruggere* le cose con la tua macchina del tempo.

View file

@ -1,78 +1,77 @@
title = Reordering events
title = Riordinare gli eventi
cards = checkout commit-auto reset-hard rebase-interactive cherry-pick
[description]
Oops, looks like there's something messed up here. Can you put the events back into their correct order?
Oops, guarda c'è qualcosa di incasinato qui. Puoi rimettere gli eventi nel corretto ordine?
There are two ways to do this: You can drag the "interactive rebase" card to the commit before the one you want to change, then reorder the lines in the file that opens, and save it.
Or you can reset the main tag to the very first commit, and then cherry-pick single commits in the order you want. You have cards for both approaches!
Ci sono due modi per farlo: Puoi spostare la carta "interactive rebase" nel commit precedente a quello che vuoi cambiare, poi aprire e riordinare le linee nel file e salvarlo.
Oppure puoi reimpostare il tag principale al primo commit, quindi selezionare i singoli commit nell'ordine desiderato. Hai carte per entrambe i modi!
[setup]
echo "You just woke up.
echo "Ti sei appena svegliato.
You are NOT wearing underwear.
Non indossi biancheria intima.
You are NOT wearing pants.
Non indossi pantaloni.
You are NOT wearing a shirt.
Non indossi la maglia.
You are NOT wearing shoes." > you
Non indossi le scarpe." > you
git add .
git commit -m "The Beginning"
git commit -m "L'inizio"
echo "You just woke up.
echo "Ti sei appena svegliato.
You are NOT wearing underwear.
Non indossi biancheria intima.
You are NOT wearing pants.
Non indossi pantaloni.
You are NOT wearing a shirt.
Non indossi la maglia.
You are wearing shoes." > you
git commit -am "Put on shoes"
Indossi le scarpe." > you
git commit -am "Metti le scarpe"
echo "You just woke up.
echo "Ti sei appena svegliato.
You are NOT wearing underwear.
Non indossi biancheria intima.
You are wearing pants.
Indossi pantaloni
You are NOT wearing a shirt.
Non indossi la maglia.
You are wearing shoes." > you
git commit -am "Put on pants"
Indossi le scarpe." > you
git commit -am "Metti i pantaloni"
echo "You just woke up.
echo "Ti sei appena svegliato.
You are wearing underwear.
Indossi la biancheria intima.
You are wearing pants.
Indossi pantaloni.
You are NOT wearing a shirt.
Non indossi la maglia.
You are wearing shoes." > you
git commit -am "Put on underwear"
Indossi le scarpe." > you
git commit -am "Metti biancheria intima"
echo "You just woke up.
echo "Ti sei appena svegliato.
You are wearing underwear.
Indossi biancheria intima.
You are wearing pants.
Indossi pantaloni.
You are wearing a shirt.
Indossi la maglia.
You are wearing shoes." > you
git commit -am "Put on shirt"
Indossi le scarpe." > you
git commit -am "Ti metti la maglia"
[win]
# Reorder the commits to dress yourself in the correct way
{ git log main --oneline | perl -0777 -ne'exit(1) if not /shoes[\s\S]*pants[\s\S]*underwear/'; } && { test "$(git log main --oneline | wc -l)" -eq 5; }
# Riordina i commits per vestirti nel modo corretto
{ git log main --oneline | perl -0777 -ne'exit(1) if not /scarpe[\s\S]*pantaloni[\s\S]*biancheria/'; } && { test "$(git log main --oneline | wc -l)" -eq 5; }
[congrats]
Feel free to reset the level and try the other strategy! Which one do you like better?
Sentiti libero di resettare il livello e provare l'altra strategia!Qual'è quella che preferisci?

View file

@ -1,30 +1,31 @@
title = Undo a bad commit
title = Annullare un cattivo commit
cards = reset commit-a
[description]
Oh no, we made a bad commit! How can we undo making the commit, and go back to a point where we can try again?
Oh no, abbiamo fatto un cattivo commit! Come possiamo annualre un commit e tornare al punto per poter riprovare?
The answer is using `git reset [commit]`, which does two things:
La risposta è usare `git reset [commit]` che fa due cose:
- It resets the current branch ref to the commit you specify.
- And it resets the index to that commit.
- Reimposta il riferimento del ramo corrente al commit che hai specificato.
- Reimposta l'indice a quel commit.
Non cambia la tua directory di lavoro in nessun modo, il che significa che dopo puoi provare a rifare il commit che desideri.
It does not change your working directory in any way, which means that after that, you can try making the commit you want again.
[setup]
echo "1 2 3 4" > numbers
git add .
git commit -m "Initial commit"
git commit -m "commit iniziale"
echo "1 2 3 4 5 6 7 8 9 11" > numbers
git commit -am "More numberrrrrs"
git commit -am "Più numerrrrri"
[win]
# In the last main commit, the numbers file contains the numbers from 1 to 10.
# Nel primo commit il file numbers contiene i numeri da 1 a 10.
test "$(git show main:numbers)" = "1 2 3 4 5 6 7 8 9 10"
# The commit message of that commit is "More numbers".
git log -1 --oneline | grep "More numbers"
# The commit with the typo is not part of the main branch anymore.
# Il messaggio di questo commit è "Più numeri".
git log -1 --oneline | grep "Più numeri"
# Il commit con l'errore si battitura non fa più parte del ramo principale.
git log --oneline | grep -v "rrrrr"

View file

@ -1,13 +1,13 @@
title = I pushed something broken
title = Ho rotto qualcosaI pushed something broken
cards = revert push
[description]
We were talking about how to undo a commit, and fix it. This only helps when you haven't already pushed it to a remote. When that has happened, and you want to undo the effects of the commit completely, your best option is `git revert`
Stavamo parlato di come annulare un commit e correggerlo. Questo ci aiuto solo quando non lo abbiamo già inviato al remoto. Quando succede questo e vuoi annullare completamente l'effetto del commit la tua migliore opzione è `git revert`
[setup]
echo "this is fine
echo "questo va bene
?
@ -16,30 +16,30 @@ echo "this is fine
?" > text
git add .
git commit -m fine
echo "this is fine
echo "questo va bene
this is also fine
anche questo va bene
?
?" > text
git commit -am "also fine"
echo "this is fine
git commit -am "anche bene"
echo "questo va bene
this is also fine
anche questo va bene
this is very bad
questo è veramente sbagliato
?" > text
git commit -am "very bad"
echo "this is fine
git commit -am "veramente sbagliato"
echo "questo va bene
this is also fine
anche questo va bene
this is very bad
questo è veramente sbagliato
this is fine again" > text
git commit -am "fine again"
questo va nuovamente bene" > text
git commit -am "nuovamente bene"
git push team main
git branch -u team/main main
@ -48,7 +48,7 @@ git branch -u team/main main
[win team]
# The team's main branch no longer contains the bad thing.
! { git show main:text | grep -q "very bad"; }
# And the history has not been modified.
git show main^:text | grep -q "very bad"
# Il ramo principale del Team non contiene più niente di sbagliato.
! { git show main:text | grep -q "veramente sbaglaito"; }
# e la cronologia non è stata modificata.
git show main^:text | grep -q "veramente sbaglaito"

View file

@ -1,13 +1,13 @@
title = Go back to where you were before
title = Torna dove eri prima
cards = checkout reflog
[description]
Say you were looking at something in the past, and then switched back to the main branch.
Diciamo che stavi guardando qualcosa in passato e poi sei tornato al ramo principale.
But then, you got reaaally distracted, and after your lunch break, you can't remember on which commit in the past you were before. How can you find out?
Ma poi ti sei distratto molto e dopo la pausa pranzo, non riesci a ricordare cosa stavi facendo prima. Come puoi scoprirlo?
There's a convenient command that shows you all the places your HEAD did point to in the past:
C'è un comodo comando che ti mostra tutti i posti a cui la tua HEAD ha puntato in passato:
git reflog
@ -22,5 +22,5 @@ git checkout main
[win]
# Find out where you've been before, and go back there!
# Trova cosa stavi facendo prima e tornaci!
test "$(git rev-parse HEAD)" = "$(git rev-parse 3)"

View file

@ -1,22 +1,22 @@
title = Restore a deleted file
title = Recuperare un file cancellato
cards = checkout
[description]
Oops - you deleted the "essay" file, which you worked on all night!
Oops - Hai cancellato il file "essay" dove hai lavorato tutta la notte!
Luckily, Git is here to help! You can use `git checkout` to restore the file!
Stai sereno, Git è qui per aiutare! Puoi usare `git checkout` per recuperare il file!
[setup]
echo important > essay
echo importante > essay
git add .
git commit -m "Initial commit"
echo "important content" > essay
git commit -am "Improve essay"
git commit -m "Commit iniziale"
echo "contenuto importante" > essay
git commit -am "Ottimizzato essay"
rm essay
[win]
# Restore the essay to contain "important content"
test "$(cat essay)" = "important content"
# Recupera il file "essay" che contiene "contenuto importante"
test "$(cat essay)" = "contenuto importante"

View file

@ -1,21 +1,22 @@
title = Restore a file from the past
title = Recuperare un file dal passato
cards = checkout checkout-from commit
[description]
Here's a similar problem: you really liked the essay from the very first commit, and want to have it back! Well, checkout can also restore things from older commits, Here's how:
Questo è un problema simile: preferivi il file "essay" del primissimo commit e vuoi riaverlo indietro! Bene, checkout puo anche recuperare le cose dai vecchi commits.
Così:
git checkout [commit] [file]
[setup]
echo "good version" > essay
echo "versione buona" > essay
git add .
git commit -m "Initial commit"
echo "bad version" > essay
git commit -am "\"Improve\" essay"
git commit -m "commit iniziale"
echo "versione cattiva" > essay
git commit -am "\"Migliorato\" essay"
[win]
# Get the first version of your essay, and make a new commit with it.
test "$(git show main:essay)" = "good version"
# Prendi la prima versione di "essay" e crea un nuovo commit con essa.
test "$(git show main:essay)" = "versione buona"