dolt-checkout
switch branches or restore working tables
TLDR
Switch to branch
SYNOPSIS
dolt checkout [options] [branch|table|commit]
DESCRIPTION
dolt checkout switches branches or restores working tree tables. Like git checkout, it serves multiple purposes: switching between branches, creating new branches, and discarding local changes.
When given a branch name, it switches the working database to that branch. With -b, it creates a new branch and switches to it. When given a table name, it restores that table to match HEAD, discarding uncommitted changes.
This command is fundamental for working with Dolt's branching model, enabling parallel development workflows on database data.
PARAMETERS
BRANCH
Branch name to switch to.TABLE
Table to restore from HEAD.COMMIT
Commit hash to checkout.-b BRANCH
Create new branch and switch to it.-B BRANCH
Create/reset branch and switch to it.--help
Display help information.
CAVEATS
Uncommitted changes may block checkout. Detached HEAD state possible with commit checkout. Table checkout discards changes irreversibly.
HISTORY
dolt checkout mirrors git checkout functionality for Dolt's versioned database system, providing familiar branch management operations for database version control.
SEE ALSO
dolt(1), dolt-branch(1), git-checkout(1)
