mirror of
https://github.com/git-tips/tips.git
synced 2024-09-21 00:01:03 +02:00
Quite handy saving unfinished work
Typo json
This commit is contained in:
parent
3ed8741c28
commit
efaba7db36
42
README.md
42
README.md
|
@ -26,6 +26,11 @@
|
||||||
* [Pick commits across branches using cherry-pick](https://github.com/git-tips/tips#pick-commits-across-branches-using-cherry-pick)
|
* [Pick commits across branches using cherry-pick](https://github.com/git-tips/tips#pick-commits-across-branches-using-cherry-pick)
|
||||||
* [Find out branches containing commit-hash](https://github.com/git-tips/tips#find-out-branches-containing-commit-hash)
|
* [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)
|
* [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)
|
||||||
|
* [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)
|
||||||
|
* [Delete all stored stashes](https://github.com/git-tips/tips#delete-all-stored-stashes)
|
||||||
|
|
||||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||||
<!-- @doxie.inject end toc -->
|
<!-- @doxie.inject end toc -->
|
||||||
|
@ -161,5 +166,42 @@ git config --global alias.<handle> <command>
|
||||||
git config --global alias.st status
|
git config --global alias.st status
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Saving current state of tracked files without commiting
|
||||||
|
```sh
|
||||||
|
git stash
|
||||||
|
```
|
||||||
|
|
||||||
|
## Show list of all saved stashes
|
||||||
|
```sh
|
||||||
|
git stash list
|
||||||
|
```
|
||||||
|
|
||||||
|
## Apply any stash without deleting from the stashed list
|
||||||
|
```sh
|
||||||
|
git stash apply <stash@{n}>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Apply last stashed state and delete it from stashed list
|
||||||
|
```sh
|
||||||
|
git stash pop
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
__Alternatives:__
|
||||||
|
```sh
|
||||||
|
git stash apply stash@{0} && git stash drop stash@{0}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Delete all stored stashes
|
||||||
|
```sh
|
||||||
|
git stash clear
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
__Alternatives:__
|
||||||
|
```sh
|
||||||
|
git stash drop <stash@{n}>
|
||||||
|
```
|
||||||
|
|
||||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||||
<!-- @doxie.inject end -->
|
<!-- @doxie.inject end -->
|
||||||
|
|
22
tips.json
22
tips.json
|
@ -92,5 +92,27 @@
|
||||||
{
|
{
|
||||||
"title": "Git Aliases",
|
"title": "Git Aliases",
|
||||||
"tip": "git config --global alias.<handle> <command> \ngit config --global alias.st status"
|
"tip": "git config --global alias.<handle> <command> \ngit config --global alias.st status"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title":"Saving current state of tracked files without commiting",
|
||||||
|
"tip": "git stash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title":"Show list of all saved stashes",
|
||||||
|
"tip": "git stash list"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Apply any stash without deleting from the stashed list",
|
||||||
|
"tip": "git stash apply <stash@{n}>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title":"Apply last stashed state and delete it from stashed list",
|
||||||
|
"tip": "git stash pop",
|
||||||
|
"alternatives": ["git stash apply stash@{0} && git stash drop stash@{0}"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Delete all stored stashes",
|
||||||
|
"tip": "git stash clear",
|
||||||
|
"alternatives": ["git stash drop <stash@{n}>"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user