mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-23 17:22:08 +02:00
git-checkout: mention reset, add single-file ex.
This commit is contained in:
parent
88eea86117
commit
6f9dbe9fce
1 changed files with 6 additions and 2 deletions
|
@ -14,10 +14,14 @@
|
|||
|
||||
`git checkout --track {{remote_name}}/{{branch_name}}`
|
||||
|
||||
- Undo unstaged local modification:
|
||||
- Discard all unstaged modifications in the current folder (see `git reset` for more undo-like commands):
|
||||
|
||||
`git checkout .`
|
||||
|
||||
- Replace a file in the current working directory with the version of it committed in a given branch:
|
||||
- Discard unstaged modifications to a given file:
|
||||
|
||||
`git checkout {{file_name}}`
|
||||
|
||||
- Replace a file in the current folder with the version of it committed in a given branch:
|
||||
|
||||
`git checkout {{branch_name}} -- {{file_name}}`
|
||||
|
|
Loading…
Add table
Reference in a new issue