1
0
mirror of https://github.com/namibia/tips.git synced 2024-11-13 16:56:30 +00:00

Add stash of unstaged changes to tracked files

This commit is contained in:
Diogo Lemos 2017-02-24 11:29:18 +00:00
parent b748f5f4cb
commit c8abe4cc13
2 changed files with 21 additions and 0 deletions

View File

@ -49,6 +49,7 @@ 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)
* [Show list of all saved stashes](#show-list-of-all-saved-stashes)
@ -406,6 +407,22 @@ __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 save -u

View File

@ -120,6 +120,10 @@
"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",