When I first started using Git, I found the command checkoutquite confusing. However, when I adapted to the Git version control model, it made sense. Now I need to teach Git to my colleagues, and I'm just trying to explain checkout. I thought I had a simple explanation (from the documentation ):
Checkout a branch or path to a working tree
It seems to combine some of the things you can do with validation, which looks like a varied set of operations for someone new to Git:
git checkout .
git checkout HEAD .
git checkout HEAD~2
git checkout feature/update-readme README.md
... except for the latter, since it does not just update the working directory, it puts the file.
How can I understand why or when the ransom will lead to the fact that something is delivered, and not just copied to the working directory?