Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/university/training/topics/stash.md')
-rw-r--r--doc/university/training/topics/stash.md58
1 files changed, 30 insertions, 28 deletions
diff --git a/doc/university/training/topics/stash.md b/doc/university/training/topics/stash.md
index 5b27ac12f77..315ced1a196 100644
--- a/doc/university/training/topics/stash.md
+++ b/doc/university/training/topics/stash.md
@@ -10,50 +10,52 @@ We use git stash to store our changes when they are not ready to be committed
and we need to change to a different branch.
* Stash
-```
-git stash save
-# or
-git stash
-# or with a message
-git stash save "this is a message to display on the list"
-```
+
+ ```
+ git stash save
+ # or
+ git stash
+ # or with a message
+ git stash save "this is a message to display on the list"
+ ```
* Apply stash to keep working on it
-```
-git stash apply
-# or apply a specific one from out stack
-git stash apply stash@{3}
-```
+
+ ```
+ git stash apply
+ # or apply a specific one from out stack
+ git stash apply stash@{3}
+ ```
----------
* Every time we save a stash it gets stacked so by using list we can see all our
stashes.
-```
-git stash list
-# or for more information (log methods)
-git stash list --stat
-```
+ ```
+ git stash list
+ # or for more information (log methods)
+ git stash list --stat
+ ```
* To clean our stack we need to manually remove them.
-```
-# drop top stash
-git stash drop
-# or
-git stash drop <name>
-# to clear all history we can use
-git stash clear
-```
+ ```
+ # drop top stash
+ git stash drop
+ # or
+ git stash drop <name>
+ # to clear all history we can use
+ git stash clear
+ ```
----------
* Apply and drop on one command
-```
- git stash pop
-```
+ ```
+ git stash pop
+ ```
* If we meet conflicts we need to either reset or commit our changes.