mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-04 03:55:20 +00:00
Update cheatsheets
This commit is contained in:
@@ -15,7 +15,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Restore an unstaged file to the version of a specific commit:
|
||||
|
||||
`git restore --source {{commit}} {{path/to/file}}`
|
||||
`git restore {{[-s|--source]}} {{commit}} {{path/to/file}}`
|
||||
|
||||
- Discard all unstaged changes to tracked files:
|
||||
|
||||
@@ -23,16 +23,16 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Unstage a file:
|
||||
|
||||
`git restore --staged {{path/to/file}}`
|
||||
`git restore {{[-S|--staged]}} {{path/to/file}}`
|
||||
|
||||
- Unstage all files:
|
||||
|
||||
`git restore --staged :/`
|
||||
`git restore {{[-S|--staged]}} :/`
|
||||
|
||||
- Discard all changes to files, both staged and unstaged:
|
||||
|
||||
`git restore --worktree --staged :/`
|
||||
`git restore {{[-W|--worktree]}} {{[-S|--staged]}} :/`
|
||||
|
||||
- Interactively select sections of files to restore:
|
||||
|
||||
`git restore --patch`
|
||||
`git restore {{[-p|--patch]}}`
|
||||
|
||||
Reference in New Issue
Block a user