oh-my-git/levels/it_IT/shit-happens/restore-a-file

23 lines
503 B
Text
Raw Normal View History

2021-09-17 11:40:31 +02:00
title = Recuperare un file cancellato
cards = checkout
2021-01-05 16:58:42 +01:00
[description]
2021-09-17 11:40:31 +02:00
Oops - Hai cancellato il file "essay" dove hai lavorato tutta la notte!
2021-01-05 16:58:42 +01:00
2021-09-17 11:40:31 +02:00
Stai sereno, Git è qui per aiutare! Puoi usare `git checkout` per recuperare il file!
2021-01-05 16:58:42 +01:00
[setup]
2021-09-17 11:40:31 +02:00
echo importante > essay
2021-01-05 16:58:42 +01:00
git add .
2021-09-17 11:40:31 +02:00
git commit -m "Commit iniziale"
echo "contenuto importante" > essay
git commit -am "Ottimizzato essay"
rm essay
2021-01-05 16:58:42 +01:00
[win]
2021-09-17 11:40:31 +02:00
# Recupera il file "essay" che contiene "contenuto importante"
test "$(cat essay)" = "contenuto importante"