|
20 | 20 | * [Delete remote branch](https://github.com/git-tips/tips#delete-remote-branch)
|
21 | 21 | * [Undo local changes with the last content in head](https://github.com/git-tips/tips#undo-local-changes-with-the-last-content-in-head)
|
22 | 22 | * [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) |
24 | 24 | * [Reword the previous commit message](https://github.com/git-tips/tips#reword-the-previous-commit-message)
|
25 | 25 | * [Changing a remote's URL](https://github.com/git-tips/tips#changing-a-remotes-url)
|
26 | 26 | * [Get list of all remote references](https://github.com/git-tips/tips#get-list-of-all-remote-references)
|
|
34 | 34 | * [Find out branches containing commit-hash](https://github.com/git-tips/tips#find-out-branches-containing-commit-hash)
|
35 | 35 | * [Git Aliases](https://github.com/git-tips/tips#git-aliases)
|
36 | 36 | * [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) |
37 | 38 | * [Show list of all saved stashes](https://github.com/git-tips/tips#show-list-of-all-saved-stashes)
|
38 | 39 | * [Apply any stash without deleting from the stashed list](https://github.com/git-tips/tips#apply-any-stash-without-deleting-from-the-stashed-list)
|
39 | 40 | * [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>
|
141 | 142 | git revert <commit-ish>
|
142 | 143 | ```
|
143 | 144 |
|
144 |
| -## Resert: Discard commits, advised for private branch |
| 145 | +## Reset: Discard commits, advised for private branch |
145 | 146 | ```sh
|
146 | 147 | git reset <commit-ish>
|
147 | 148 | ```
|
@@ -224,6 +225,23 @@ git config --global alias.st status
|
224 | 225 | git stash
|
225 | 226 | ```
|
226 | 227 |
|
| 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 | + |
227 | 245 | ## Show list of all saved stashes
|
228 | 246 | ```sh
|
229 | 247 | git stash list
|
|
0 commit comments