mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-23 21:01:22 +02:00
Add split description in italia and english and add directory it in levels
This commit is contained in:
parent
943126647b
commit
2c275424a3
104 changed files with 3510 additions and 38 deletions
levels/it/branches
43
levels/it/branches/checkout-commit
Normal file
43
levels/it/branches/checkout-commit
Normal file
|
@ -0,0 +1,43 @@
|
|||
title = Moving through time
|
||||
cards = checkout commit-auto
|
||||
|
||||
[description]
|
||||
|
||||
The yellow boxes are frozen points in time, we call them "commits"! You can travel between them using the "checkout" card! (Try it!)
|
||||
|
||||
Can you find out what happened here? Then, while on the last commit, edit the files to fix the problem, and make a new commit!
|
||||
|
||||
[cli]
|
||||
|
||||
To checkout a specific commit, type `git checkout`, then a space, and then right click on the commit you want!
|
||||
|
||||
This will insert the commit's unique identifier!
|
||||
|
||||
[setup]
|
||||
|
||||
echo "This piggy bank belongs to the big sister.
|
||||
It contains 10 coins." > piggy_bank
|
||||
git add .
|
||||
git commit -m "The beginning"
|
||||
|
||||
echo "A young girl with brown, curly hair." > little_sister
|
||||
git add .
|
||||
git commit -m "Little sister comes in"
|
||||
|
||||
echo "Has 10 coins." >> little_sister
|
||||
echo "This piggy bank belongs to the big sister.
|
||||
It is empty." > piggy_bank
|
||||
git add .
|
||||
git commit -m "Little sister does something"
|
||||
|
||||
git checkout HEAD^^
|
||||
git branch -df main
|
||||
|
||||
[win]
|
||||
|
||||
# Restore sisterly peace.
|
||||
{ git show HEAD:piggy_bank | grep "10 coins"; } && { git show HEAD:little_sister | grep -v "10 coins"; } && { git rev-parse HEAD^^^; }
|
||||
|
||||
[congrats]
|
||||
|
||||
Wonderful! Now that you're getting familiar with the time machine, let's look at some more complicated situations...
|
Loading…
Add table
Add a link
Reference in a new issue