Update cheatsheets

This commit is contained in:
ivuorinen
2025-05-06 00:19:54 +00:00
parent e452860d9b
commit 7e39fb6df5
49 changed files with 132 additions and 93 deletions

View File

@@ -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]}}`