dolt_checkout() checks out a dolt branch, setting that branch as HEAD and bringing you to its tip. dolt_use() sets the database to use a specific commit as it's state and puts you in read-only mode.

dolt_checkout(
  branch,
  b = FALSE,
  start_point = NULL,
  conn = dolt(),
  collect = NULL,
  show_sql = NULL
)

dolt_use(hash = NULL, conn = dolt())

Arguments

branch

the branch to check out

b

whether to create a new branch

start_point

a commit hash from which the branch should start. If NULL, starts from current HEAD.

conn

the database connection

collect

whether to collect the result into R or return a dbplyr::tbl_lazy() to be further processed before collecting. Defaults to TRUE, can be set with the environment variable DOLT_COLLECT.

show_sql

Whether to print the SQL statements used internally to fetch the data. Useful for learning how Dolt works internally. Defaults to FALSE, can be set with the environment variable DOLT_VERBOSE.

hash

the commit hash you want to set the database to. If NULL, checks out the head of the main branch and brings you out of read-only mode.