>_ linuxcommand.dev
Startseite git checkout
Version Control

git checkout

Switch branch or restore files.

Ubuntu CentOS Debian SUSE Fedora RHEL Arch Alpine macOS
Last updated: Report error
Syntax
$git checkout [OPTIONS] <BRANCH|FILE>
Examples
$git checkout main
$git checkout -b newbranch
$git checkout -- file.txt
Typical use cases
?
Standard usage
git checkout --help
Note Switch context.
Export