oh-my-git/levels/it_IT/merge/merge

83 lines
1.5 KiB
Text
Raw Normal View History

2021-09-14 17:03:17 +02:00
title = Unire le linee temporali
2020-10-29 20:02:43 +01:00
cards = checkout commit-auto merge
2020-10-22 16:19:22 +02:00
[description]
2021-09-14 17:03:17 +02:00
Ecco un trucco per domire un pò più a lungo: fai tutte le tue attività, in universi paralleli, e poi uniscile!
[setup]
2021-09-14 17:03:17 +02:00
echo "Non hai una baguette.
2021-09-14 17:03:17 +02:00
Non hai caffe.
2021-09-14 17:03:17 +02:00
Non hai una ciambella." > you
git add .
2021-09-14 17:03:17 +02:00
git commit -m "L'inizio"
2021-09-14 17:03:17 +02:00
echo "Hai una baguette.
2021-09-14 17:03:17 +02:00
Non hai caffe.
2021-09-14 17:03:17 +02:00
Non hai una ciambella." > you
git add .
2021-09-14 17:03:17 +02:00
git commit -m "Compri una baguette"
2021-09-14 17:03:17 +02:00
echo "Mangi una baguette.
2021-09-14 17:03:17 +02:00
Non hai caffe.
2021-09-14 17:03:17 +02:00
Non hai una ciambella." > you
git add .
2021-09-14 17:03:17 +02:00
git commit -m "Mangi la baguette"
git checkout HEAD~2
2021-09-14 17:03:17 +02:00
echo "Non hai una baguette.
2021-09-14 17:03:17 +02:00
Hai caffe.
2021-09-14 17:03:17 +02:00
Non hai una ciambella." > you
git add .
2021-09-14 17:03:17 +02:00
git commit -m "Compri un pò di caffe"
2021-09-14 17:03:17 +02:00
echo "Non hai una baguette.
2021-09-14 17:03:17 +02:00
Bevi caffe.
2021-09-14 17:03:17 +02:00
Non hai una ciambella." > you
git add .
2021-09-14 17:03:17 +02:00
git commit -m "Bevi il caffe"
git checkout HEAD~2
2021-09-14 17:03:17 +02:00
echo "Non hai una baguette.
2020-10-22 17:27:54 +02:00
2021-09-14 17:03:17 +02:00
Non hai caffe.
2020-10-22 17:27:54 +02:00
2021-09-14 17:03:17 +02:00
Hai una ciambella." > you
2020-10-22 17:27:54 +02:00
git add .
2021-09-14 17:03:17 +02:00
git commit -m "Compri una ciambella"
2021-09-14 17:03:17 +02:00
echo "Non hai una baguette.
2021-09-14 17:03:17 +02:00
Non hai caffe.
2021-09-14 17:03:17 +02:00
Mangi una ciambella." > you
2020-10-22 17:27:54 +02:00
git add .
2021-09-14 17:03:17 +02:00
git commit -m "Mangi la ciambella"
2020-10-22 17:27:54 +02:00
2021-01-13 16:26:48 +01:00
git checkout --detach
git branch -D main
[win]
2021-09-14 17:03:17 +02:00
# Crea una situazione dove consumi una baguette, un caffe e una ciambella.
{ git show HEAD:you | grep "Mangi.*baguette"; } && { git show HEAD:you | grep "Bevi.*coffe"; } && { git show HEAD:you | grep "Mangi.*donut"; }
2020-10-22 17:27:54 +02:00
2021-09-14 17:03:17 +02:00
# E' un commit di unione.
test "$(git log --pretty=%P -n 1 HEAD | wc -w)" -ge 2
2020-10-22 17:27:54 +02:00
[congrats]
2021-09-14 17:03:17 +02:00
Mi chiedo se sei più rilassato quando *dormi* in linee temporali parallele...