oh-my-git/levels/it_IT/stash/stash-branch

48 lines
862 B
Text
Raw Normal View History

2021-09-13 17:54:39 +02:00
title = Ramo dalla scorta
2021-01-05 16:44:17 +01:00
cards = checkout commit-auto merge reset-hard
[description]
2021-09-13 17:54:39 +02:00
Se vuoi matenere tutte le modifiche ma non appartengono al ramo principale, puoi facilemnte creare un nuovo ramo dai cambiamenti dalle modifiche nascoste. Usando
2021-01-05 16:44:17 +01:00
git stash branch <branchname> <stash>
2021-09-13 17:54:39 +02:00
Se vuoi solo usare l'ultimo elemento della scorta puoi lasciare vuota l'opzione <stash>.
2021-01-05 16:44:17 +01:00
2021-09-13 17:54:39 +02:00
Crea un nuovo ramo dalle modifiche nascoste!!
2021-01-05 16:44:17 +01:00
---
tipp1
---
tipp2
---
tipp3
[setup]
2021-09-13 17:54:39 +02:00
echo "Torta di mele:" > recipe
2021-01-05 16:44:17 +01:00
git add .
2021-09-13 17:54:39 +02:00
git commit -m "creata una ricetta"
2021-01-05 16:44:17 +01:00
2021-09-13 17:54:39 +02:00
echo "- 4 Mele" >> recipe
2021-01-05 16:44:17 +01:00
git add .
2021-09-13 17:54:39 +02:00
git commit -m "Aggiunto ingredienti"
2021-01-05 16:44:17 +01:00
2021-09-13 17:54:39 +02:00
echo "- 500g Farina" >> recipe
2021-01-05 16:44:17 +01:00
git stash push
git checkout main
[win]
2021-09-13 17:54:39 +02:00
# Hai creato un nuovo ramo dai cambiamenti nascosti?
2021-01-05 16:44:17 +01:00
test "$(git branch --list| wc -l)" -ge 2
[actions]
[congrats]
2021-09-13 17:54:39 +02:00
I cambiamenti nascosti sono nel nuovo ramo! :)