Skip to content

Commit a2319d7

Browse files
committed
git stash save -u which i started using
1 parent 5566a52 commit a2319d7

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* [Delete remote branch](https://github.com/git-tips/tips#delete-remote-branch)
2121
* [Undo local changes with the last content in head](https://github.com/git-tips/tips#undo-local-changes-with-the-last-content-in-head)
2222
* [Revert: Undo a commit by creating a new commit](https://github.com/git-tips/tips#revert-undo-a-commit-by-creating-a-new-commit)
23-
* [Resert: Discard commits, advised for private branch](https://github.com/git-tips/tips#resert-discard-commits-advised-for-private-branch)
23+
* [Reset: Discard commits, advised for private branch](https://github.com/git-tips/tips#reset-discard-commits-advised-for-private-branch)
2424
* [Reword the previous commit message](https://github.com/git-tips/tips#reword-the-previous-commit-message)
2525
* [Changing a remote's URL](https://github.com/git-tips/tips#changing-a-remotes-url)
2626
* [Get list of all remote references](https://github.com/git-tips/tips#get-list-of-all-remote-references)
@@ -34,6 +34,7 @@
3434
* [Find out branches containing commit-hash](https://github.com/git-tips/tips#find-out-branches-containing-commit-hash)
3535
* [Git Aliases](https://github.com/git-tips/tips#git-aliases)
3636
* [Saving current state of tracked files without commiting](https://github.com/git-tips/tips#saving-current-state-of-tracked-files-without-commiting)
37+
* [Saving current state including untracked files](https://github.com/git-tips/tips#saving-current-state-including-untracked-files)
3738
* [Show list of all saved stashes](https://github.com/git-tips/tips#show-list-of-all-saved-stashes)
3839
* [Apply any stash without deleting from the stashed list](https://github.com/git-tips/tips#apply-any-stash-without-deleting-from-the-stashed-list)
3940
* [Apply last stashed state and delete it from stashed list](https://github.com/git-tips/tips#apply-last-stashed-state-and-delete-it-from-stashed-list)
@@ -141,7 +142,7 @@ git checkout -- <file_name>
141142
git revert <commit-ish>
142143
```
143144

144-
## Resert: Discard commits, advised for private branch
145+
## Reset: Discard commits, advised for private branch
145146
```sh
146147
git reset <commit-ish>
147148
```
@@ -224,6 +225,23 @@ git config --global alias.st status
224225
git stash
225226
```
226227

228+
229+
__Alternatives:__
230+
```sh
231+
git stash save
232+
```
233+
234+
## Saving current state including untracked files
235+
```sh
236+
git stash save -u
237+
```
238+
239+
240+
__Alternatives:__
241+
```sh
242+
git stash save --include-untracked
243+
```
244+
227245
## Show list of all saved stashes
228246
```sh
229247
git stash list

tips.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"tip":"git revert <commit-ish>"
7070
},
7171
{
72-
"title":"Resert: Discard commits, advised for private branch",
72+
"title":"Reset: Discard commits, advised for private branch",
7373
"tip":"git reset <commit-ish>"
7474
},
7575
{
@@ -124,7 +124,13 @@
124124
},
125125
{
126126
"title":"Saving current state of tracked files without commiting",
127-
"tip": "git stash"
127+
"tip": "git stash",
128+
"alternatives": ["git stash save"]
129+
},
130+
{
131+
"title":"Saving current state including untracked files",
132+
"tip": "git stash save -u",
133+
"alternatives": ["git stash save --include-untracked"]
128134
},
129135
{
130136
"title":"Show list of all saved stashes",

0 commit comments

Comments
 (0)