diff --git a/pages/common/git-checkout.md b/pages/common/git-checkout.md index 7d45d729b..fff881622 100644 --- a/pages/common/git-checkout.md +++ b/pages/common/git-checkout.md @@ -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}}`