Skip to content

qruise kb checkout

Switch branches.

Syntax

 qruise kb checkout [OPTIONS] [BRANCH]

Description

The qruise kb branch command switches knowledge base branches created with qruise kb branch command. Can also be used for creating branches.

Arguments

Argument Description
BRANCH Name of the branch (optional).

Options

Option Description
-b Create a new branch and check it out.
-p, --profile Qruise KB profile name.
--profiles Specify path to the Qruise profiles file.
--database Override database name.
--organization Override organization name.
--help Show a help message and exit.

Examples

Switching branches

The basic usage of qruise kb checkout is to switch branches. Assuming you want to switch to a branch named my_new_branch, simply run:

qruise kb checkout my_new_branch

Create and checkout a branch

Let's assume that there are the following branches present in the knowledge base:

$ qruise kb branch
  branch_1
  branch_2
* main

If you try to check out to a branch that does not exist, e.g. does_not_exist, qruise will exit with an error message:

$ qruise kb checkout does_not_exist
Branch 'does_not_exist' does not exist

However, you can use the -b flag to create a branch if it does not exist:

$ qruise kb checkout -b does_not_exist
Switchted to a new branch 'does_not_exist'

Listing branches now reveals that does_not_exist is now the active branch:

$ qruise kb branch
  branch_1
  branch_2
* does_not_exist
  main