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)`.
4949* [ Find out branches containing commit-hash] ( #find-out-branches-containing-commit-hash )
5050* [ Git Aliases] ( #git-aliases )
5151* [ 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 )
5253* [ Saving current state including untracked files] ( #saving-current-state-including-untracked-files )
5354* [ Saving current state with message] ( #saving-current-state-with-message )
5455* [ Show list of all saved stashes] ( #show-list-of-all-saved-stashes )
@@ -406,6 +407,22 @@ __Alternatives:__
406407git stash save
407408```
408409
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+
409426## Saving current state including untracked files
410427``` sh
411428git stash save -u
Original file line number Diff line number Diff line change 120120 "title" : " Saving current state of tracked files without commiting" ,
121121 "tip" : " git stash" ,
122122 "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" ]
123127}, {
124128 "title" : " Saving current state including untracked files" ,
125129 "tip" : " git stash save -u" ,
You can’t perform that action at this time.
0 commit comments