mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-21 22:51:09 +00:00
Update cheatsheets
This commit is contained in:
@@ -8,25 +8,25 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Stash local Git changes in a temporary area.
|
||||
> More information: <https://git-scm.com/docs/git-stash>.
|
||||
|
||||
- Stash current changes with a [m]essage, except new (untracked) files:
|
||||
- Stash current changes with a message, except new (untracked) files:
|
||||
|
||||
`git stash push --message {{optional_stash_message}}`
|
||||
`git stash push {{[-m|--message]}} {{optional_stash_message}}`
|
||||
|
||||
- Stash current changes, including new ([u]ntracked) files:
|
||||
- Stash current changes, including new untracked files:
|
||||
|
||||
`git stash --include-untracked`
|
||||
`git stash {{[-u|--include-untracked]}}`
|
||||
|
||||
- Interactively select [p]arts of changed files for stashing:
|
||||
- Interactively select parts of changed files for stashing:
|
||||
|
||||
`git stash --patch`
|
||||
`git stash {{[-p|--patch]}}`
|
||||
|
||||
- List all stashes (shows stash name, related branch and message):
|
||||
|
||||
`git stash list`
|
||||
|
||||
- Show the changes as a [p]atch between the stash (default is `stash@{0}`) and the commit back when stash entry was first created:
|
||||
- Show the changes as a patch between the stash (default is `stash@{0}`) and the commit back when stash entry was first created:
|
||||
|
||||
`git stash show --patch {{stash@{0}}}`
|
||||
`git stash show {{[-p|--patch]}} {{stash@{0}}}`
|
||||
|
||||
- Apply a stash (default is the latest, named stash@{0}):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user