Git - Checkout
Table of Contents
About
A checkout will change the current branch
Specifically, it will checkout the files
- from the repository
- for a branch
- in the working directory
- to match the version in the index (staging area)
In other term, with a checkout, you can
- change the current branch (ie switch branches
- or restore working tree files
Checking out a local branch from a remote-tracking branch automatically creates what is called a tracking branch
Usage
For:
- all unstaged files use at the root dir:
git checkout -- .
- a specific file
git checkout path/to/file
Support
error: pathspec '.' did not match any file(s) known to git.
Do you perform the checkout from the root directory ?