oh-my-git/levels/it_IT/branches/reorder
2021-09-14 12:18:31 +02:00

90 lines
1.8 KiB
Plaintext

title = Muovere i rami
cards = checkout commit-auto merge reset-hard
[description]
Uno dei tuoi colleghi ha fatto un casino qui e ha messo le branches nelle line temporali sbagliate!
Potresti cancellare e ricreare queste branches - ma puoi anche muoverle direttamente in un differente commit usando:
git checkout
nel nome della branch e poi usare
git reset --hard
nel commit dove vuoi che la branch vada.
La ciambella è nella branch giusto ma la linea temporale è incompleta - fai *mangiare* la ciambella a quella branch!
[setup]
echo "Tu non hai una baguette.
Non hai un caffe.
Non hai una ciambella." > you
git add .
git commit -m "L'inizio"
git checkout -b coffee
echo "Tu hai una baguette.
Non hai un caffe.
Non hai una ciambella." > you
git add .
git commit -m "Compri una ciambella"
echo "Mangi una baguette.
Non hai un caffe.
Non hai una ciambella." > you
git add .
git commit -m "Mangi una baguette"
git checkout -b baguette main
echo "Non hai una ciambella.
Hai un caffe.
Non hai una ciambella." > you
git add .
git commit -m "Compri un pò di caffe"
echo "Non hai una baguette.
Hai bevuto caffe.
Non hai una ciambella." > you
git add .
git commit -m "Bevi il caffe"
git checkout -b donut main
echo "Non hai una baguette.
Non hai caffe.
Hai una ciambella." > you
git add .
git commit -m "Compri una ciambella"
git checkout --detach main
[win]
# Mangi una baguette nella branch delle baguette?
git show baguette:you | grep "Mangi.*baguette"
# Bevi un caffe nella branch del caffe?
git show coffee:you | grep "Bevi.*coffe"
# Mangi una ciambella nella branch delle ciambelle?
git show donut:you | grep "Mangi.*ciambella"
[actions]
test "$(git rev-parse HEAD^)" = "$(git rev-parse donut)" && hint "Ricordati di controllare l'etichetta branch blue quando vuoi che cresca con la linea temporale."