mirror of
https://github.com/namibia/tips.git
synced 2024-12-22 18:18:58 +00:00
commit
c98730cb76
41
README.md
41
README.md
@ -49,8 +49,10 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
|
||||
* [Find out branches containing commit-hash](#find-out-branches-containing-commit-hash)
|
||||
* [Git Aliases](#git-aliases)
|
||||
* [Saving current state of tracked files without commiting](#saving-current-state-of-tracked-files-without-commiting)
|
||||
* [Saving current state of unstaged changes to tracked files](#saving-current-state-of-unstaged-changes-to-tracked-files)
|
||||
* [Saving current state including untracked files](#saving-current-state-including-untracked-files)
|
||||
* [Saving current state with message](#saving-current-state-with-message)
|
||||
* [Saving current state of all files (ignored, untracked, and tracked)](#saving-current-state-of-all-files-ignored-untracked-and-tracked)
|
||||
* [Show list of all saved stashes](#show-list-of-all-saved-stashes)
|
||||
* [Apply any stash without deleting from the stashed list](#apply-any-stash-without-deleting-from-the-stashed-list)
|
||||
* [Apply last stashed state and delete it from stashed list](#apply-last-stashed-state-and-delete-it-from-stashed-list)
|
||||
@ -406,13 +408,34 @@ __Alternatives:__
|
||||
git stash save
|
||||
```
|
||||
|
||||
## Saving current state of unstaged changes to tracked files
|
||||
```sh
|
||||
git stash -k
|
||||
```
|
||||
|
||||
|
||||
__Alternatives:__
|
||||
```sh
|
||||
git stash --keep-index
|
||||
```
|
||||
|
||||
|
||||
```sh
|
||||
git stash save --keep-index
|
||||
```
|
||||
|
||||
## Saving current state including untracked files
|
||||
```sh
|
||||
git stash -u
|
||||
```
|
||||
|
||||
|
||||
__Alternatives:__
|
||||
```sh
|
||||
git stash save -u
|
||||
```
|
||||
|
||||
|
||||
__Alternatives:__
|
||||
```sh
|
||||
git stash save --include-untracked
|
||||
```
|
||||
@ -422,6 +445,22 @@ git stash save --include-untracked
|
||||
git stash save <message>
|
||||
```
|
||||
|
||||
## Saving current state of all files (ignored, untracked, and tracked)
|
||||
```sh
|
||||
git stash -a
|
||||
```
|
||||
|
||||
|
||||
__Alternatives:__
|
||||
```sh
|
||||
git stash --all
|
||||
```
|
||||
|
||||
|
||||
```sh
|
||||
git stash save --all
|
||||
```
|
||||
|
||||
## Show list of all saved stashes
|
||||
```sh
|
||||
git stash list
|
||||
|
12
tips.json
12
tips.json
@ -120,13 +120,21 @@
|
||||
"title": "Saving current state of tracked files without commiting",
|
||||
"tip": "git stash",
|
||||
"alternatives": ["git stash save"]
|
||||
}, {
|
||||
"title": "Saving current state of unstaged changes to tracked files",
|
||||
"tip": "git stash -k",
|
||||
"alternatives": ["git stash --keep-index", "git stash save --keep-index"]
|
||||
}, {
|
||||
"title": "Saving current state including untracked files",
|
||||
"tip": "git stash save -u",
|
||||
"alternatives": ["git stash save --include-untracked"]
|
||||
"tip": "git stash -u",
|
||||
"alternatives": ["git stash save -u", "git stash save --include-untracked"]
|
||||
}, {
|
||||
"title": "Saving current state with message",
|
||||
"tip": "git stash save <message>"
|
||||
}, {
|
||||
"title": "Saving current state of all files (ignored, untracked, and tracked)",
|
||||
"tip": "git stash -a",
|
||||
"alternatives": ["git stash --all", "git stash save --all"]
|
||||
}, {
|
||||
"title": "Show list of all saved stashes",
|
||||
"tip": "git stash list"
|
||||
|
Loading…
Reference in New Issue
Block a user