File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
49
49
* [ Find out branches containing commit-hash] ( #find-out-branches-containing-commit-hash )
50
50
* [ Git Aliases] ( #git-aliases )
51
51
* [ Saving current state of tracked files without commiting] ( #saving-current-state-of-tracked-files-without-commiting )
52
+ * [ Saving current state of unstaged changes to tracked files] ( #saving-current-state-of-unstaged-changes-to-tracked-files )
52
53
* [ Saving current state including untracked files] ( #saving-current-state-including-untracked-files )
53
54
* [ Saving current state with message] ( #saving-current-state-with-message )
54
55
* [ Show list of all saved stashes] ( #show-list-of-all-saved-stashes )
@@ -406,6 +407,22 @@ __Alternatives:__
406
407
git stash save
407
408
```
408
409
410
+ ## Saving current state of unstaged changes to tracked files
411
+ ``` sh
412
+ git stash -k
413
+ ```
414
+
415
+
416
+ __ Alternatives:__
417
+ ``` sh
418
+ git stash --keep-index
419
+ ```
420
+
421
+
422
+ ``` sh
423
+ git stash save --keep-index
424
+ ```
425
+
409
426
## Saving current state including untracked files
410
427
``` sh
411
428
git stash save -u
Original file line number Diff line number Diff line change 120
120
"title" : " Saving current state of tracked files without commiting" ,
121
121
"tip" : " git stash" ,
122
122
"alternatives" : [" git stash save" ]
123
+ }, {
124
+ "title" : " Saving current state of unstaged changes to tracked files" ,
125
+ "tip" : " git stash -k" ,
126
+ "alternatives" : [" git stash --keep-index" , " git stash save --keep-index" ]
123
127
}, {
124
128
"title" : " Saving current state including untracked files" ,
125
129
"tip" : " git stash save -u" ,
You can’t perform that action at this time.
0 commit comments