1
0
Fork 0
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:
Waldir Pimenta 2017-05-15 17:52:38 +01:00 committed by Starbeamrainbowlabs
parent 88eea86117
commit 6f9dbe9fce

View file

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