added section for git stash
This commit is contained in:
8
git.md
8
git.md
@@ -7,6 +7,7 @@
|
|||||||
- [branches](#branches)
|
- [branches](#branches)
|
||||||
- [create a branch](#create-a-branch)
|
- [create a branch](#create-a-branch)
|
||||||
- [submodules](#submodules)
|
- [submodules](#submodules)
|
||||||
|
- [stash](#stash)
|
||||||
- [removing files from index](#removing-files-from-index)
|
- [removing files from index](#removing-files-from-index)
|
||||||
- [philosophies](#philosophies)
|
- [philosophies](#philosophies)
|
||||||
- [merge](#merge)
|
- [merge](#merge)
|
||||||
@@ -53,6 +54,13 @@ git submodule update --init --recursive
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## stash
|
||||||
|
|
||||||
|
If the current tree is dirty, one can use `git stash` to temporarily save the changes and reset the tree to the last commit.
|
||||||
|
Afterwards the changes can be reapplied with `git stash pop`.
|
||||||
|
This can be useful if for example one would like to create a new branch for the current changes.
|
||||||
|
|
||||||
|
|
||||||
## removing files from index
|
## removing files from index
|
||||||
|
|
||||||
To remove files from index without deleting them on disk, use:
|
To remove files from index without deleting them on disk, use:
|
||||||
|
|||||||
Reference in New Issue
Block a user