diff --git a/README.md b/README.md index e31f4b7..535cae0 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ * [Delete remote branch](https://github.com/git-tips/tips#delete-remote-branch) * [Undo local changes with the last content in head](https://github.com/git-tips/tips#undo-local-changes-with-the-last-content-in-head) * [Revert: Undo a commit by creating a new commit](https://github.com/git-tips/tips#revert-undo-a-commit-by-creating-a-new-commit) -* [Resert: Discard commits, advised for private branch](https://github.com/git-tips/tips#resert-discard-commits-advised-for-private-branch) +* [Reset: Discard commits, advised for private branch](https://github.com/git-tips/tips#reset-discard-commits-advised-for-private-branch) * [Reword the previous commit message](https://github.com/git-tips/tips#reword-the-previous-commit-message) * [Changing a remote's URL](https://github.com/git-tips/tips#changing-a-remotes-url) * [Get list of all remote references](https://github.com/git-tips/tips#get-list-of-all-remote-references) @@ -34,6 +34,7 @@ * [Find out branches containing commit-hash](https://github.com/git-tips/tips#find-out-branches-containing-commit-hash) * [Git Aliases](https://github.com/git-tips/tips#git-aliases) * [Saving current state of tracked files without commiting](https://github.com/git-tips/tips#saving-current-state-of-tracked-files-without-commiting) +* [Saving current state including untracked files](https://github.com/git-tips/tips#saving-current-state-including-untracked-files) * [Show list of all saved stashes](https://github.com/git-tips/tips#show-list-of-all-saved-stashes) * [Apply any stash without deleting from the stashed list](https://github.com/git-tips/tips#apply-any-stash-without-deleting-from-the-stashed-list) * [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 -- git revert ``` -## Resert: Discard commits, advised for private branch +## Reset: Discard commits, advised for private branch ```sh git reset ``` @@ -224,6 +225,23 @@ git config --global alias.st status git stash ``` + +__Alternatives:__ +```sh +git stash save +``` + +## Saving current state including untracked files +```sh +git stash save -u +``` + + +__Alternatives:__ +```sh +git stash save --include-untracked +``` + ## Show list of all saved stashes ```sh git stash list diff --git a/tips.json b/tips.json index e8b0739..ef8d003 100644 --- a/tips.json +++ b/tips.json @@ -69,7 +69,7 @@ "tip":"git revert " }, { - "title":"Resert: Discard commits, advised for private branch", + "title":"Reset: Discard commits, advised for private branch", "tip":"git reset " }, { @@ -124,7 +124,13 @@ }, { "title":"Saving current state of tracked files without commiting", - "tip": "git stash" + "tip": "git stash", + "alternatives": ["git stash save"] + }, + { + "title":"Saving current state including untracked files", + "tip": "git stash save -u", + "alternatives": ["git stash save --include-untracked"] }, { "title":"Show list of all saved stashes",