oh-my-git/levels/it_IT/index/reset

38 lines
1 KiB
Text
Raw Normal View History

title = Resettare i file nell'indice
cards = add reset-file commit
2021-01-05 12:46:07 +01:00
[description]
2021-09-14 17:03:17 +02:00
Vedi l'ombra scura dietro le icone? Questa è la versione del file nell'ultimo commit!
2021-02-04 12:01:58 +01:00
2021-09-14 17:03:17 +02:00
Per esempio, queste candele sono state spente e quella modifica è stata aggiunta!
2021-02-04 12:01:58 +01:00
2021-09-14 17:03:17 +02:00
Ma è stato un errore! Vuoi solo spegnere al candela rossa nel prossimo commit!
Se hai già aggiunto un file modificato all'indice ma vuoi ripristinarlo, puoi usare `git reset`!
2021-01-05 12:46:07 +01:00
[setup]
2021-09-14 17:03:17 +02:00
echo "Sta bruciando!" > red_candle
echo "Sta bruciando!" > green_candle
echo "Sta bruciando!" > blue_candle
2021-01-05 12:46:07 +01:00
git add .
2021-09-14 17:03:17 +02:00
git commit -m "L'inizio"
2021-02-04 12:01:58 +01:00
echo "È stata spenta." > red_candle
echo "È stata spenta." > green_candle
echo "È stata spenta." > blue_candle
2021-01-05 12:46:07 +01:00
git add .
[win]
# Ripristina i cambiamenti nella candela verde e in quella blu!
2021-02-04 12:01:58 +01:00
git show :green_candle | grep burning &&
git show :blue_candle | grep burning &&
git show :red_candle | grep -v burning
2021-09-14 17:03:17 +02:00
# E fai un commit
2021-02-04 12:01:58 +01:00
git show main:green_candle | grep burning &&
git show main:blue_candle | grep burning &&
git show main:red_candle | grep -v burning