mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-11-24 16:20:08 +01:00
45 lines
701 B
Text
45 lines
701 B
Text
title = Stashing
|
|
cards = checkout commit-auto merge reset-hard
|
|
|
|
[description]
|
|
|
|
You will encounter situations in which you are working on your project but you need to
|
|
put your current changes aride temporarily. To do so, you can use the stash function. Use
|
|
git stash push
|
|
to add your current changes to the stash stack.
|
|
|
|
---
|
|
tipp1
|
|
---
|
|
tipp2
|
|
---
|
|
tipp3
|
|
|
|
[setup]
|
|
|
|
echo "Apple Pie:" > recipe
|
|
|
|
git add .
|
|
git commit -m "creating a recipe"
|
|
|
|
echo "- 4 Apples" >> recipe
|
|
|
|
git add .
|
|
git commit -m "Adding ingredients"
|
|
|
|
echo "- 500g Flour" >> recipe
|
|
|
|
git checkout main
|
|
|
|
[win]
|
|
|
|
# Did you stash the current changes?
|
|
test "$(git stash list | wc -l)" -ge 1
|
|
|
|
[actions]
|
|
|
|
|
|
|
|
[congrats]
|
|
|
|
Nice stash you got there! :)
|