Merge pull request #141 from dmlemos/stash_additions

Stash additions
This commit is contained in:
hemanth.hm 2017-02-24 18:19:18 +05:30 committed by GitHub
commit c98730cb76
2 changed files with 50 additions and 3 deletions

View File

@ -49,8 +49,10 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
* [Find out branches containing commit-hash](#find-out-branches-containing-commit-hash)
* [Git Aliases](#git-aliases)
* [Saving current state of tracked files without commiting](#saving-current-state-of-tracked-files-without-commiting)
* [Saving current state of unstaged changes to tracked files](#saving-current-state-of-unstaged-changes-to-tracked-files)
* [Saving current state including untracked files](#saving-current-state-including-untracked-files)
* [Saving current state with message](#saving-current-state-with-message)
* [Saving current state of all files (ignored, untracked, and tracked)](#saving-current-state-of-all-files-ignored-untracked-and-tracked)
* [Show list of all saved stashes](#show-list-of-all-saved-stashes)
* [Apply any stash without deleting from the stashed list](#apply-any-stash-without-deleting-from-the-stashed-list)
* [Apply last stashed state and delete it from stashed list](#apply-last-stashed-state-and-delete-it-from-stashed-list)
@ -406,13 +408,34 @@ __Alternatives:__
git stash save
```
## Saving current state of unstaged changes to tracked files
```sh
git stash -k
```
__Alternatives:__
```sh
git stash --keep-index
```
```sh
git stash save --keep-index
```
## Saving current state including untracked files
```sh
git stash -u
```
__Alternatives:__
```sh
git stash save -u
```
__Alternatives:__
```sh
git stash save --include-untracked
```
@ -422,6 +445,22 @@ git stash save --include-untracked
git stash save <message>
```
## Saving current state of all files (ignored, untracked, and tracked)
```sh
git stash -a
```
__Alternatives:__
```sh
git stash --all
```
```sh
git stash save --all
```
## Show list of all saved stashes
```sh
git stash list

View File

@ -120,13 +120,21 @@
"title": "Saving current state of tracked files without commiting",
"tip": "git stash",
"alternatives": ["git stash save"]
}, {
"title": "Saving current state of unstaged changes to tracked files",
"tip": "git stash -k",
"alternatives": ["git stash --keep-index", "git stash save --keep-index"]
}, {
"title": "Saving current state including untracked files",
"tip": "git stash save -u",
"alternatives": ["git stash save --include-untracked"]
"tip": "git stash -u",
"alternatives": ["git stash save -u", "git stash save --include-untracked"]
}, {
"title": "Saving current state with message",
"tip": "git stash save <message>"
}, {
"title": "Saving current state of all files (ignored, untracked, and tracked)",
"tip": "git stash -a",
"alternatives": ["git stash --all", "git stash save --all"]
}, {
"title": "Show list of all saved stashes",
"tip": "git stash list"