git checkout
is used to switch between branches or restore files in a Git repository.
- Switch Branch:
Switches to the specified branch.
- Restore File:
Restores a file to its last committed state.
For newer Git versions, use git switch
for branch operations.