Sinossi
git checkout [<branch>]
git checkout -b <new-branch> [<start-point>]
git checkout [<tree-ish>] -- <file>...
Descrizione
Il comando git checkout storicamente fa due cose non correlate: cambiare branch e ripristinare file. A causa di questo sovraccarico, Git moderno ha introdotto git switch per le operazioni sui branch e git restore per quelle sui file.