qruise kb branch
List, create, or delete branches.
Syntax¶
Description¶
The qruise kb branch
command allows branch management in the knowledge base.
Arguments¶
Argument | Description |
---|---|
BRANCH_NAME |
Name of the branch (optional). |
Options¶
Option | Description |
---|---|
-d, --delete |
Delete the branch. |
-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¶
Listing branches¶
The most basic branch-related command is simply listing all the branches in the knowledge base. To do so, run the qruise kb branch
command without any arguments:
In the example above, there are three different branches present: main
, new_experiments
, and testing_new_parameters
. The asterisk (*
) to the left of testing_new_parameters
indicates that this is the current active branch.
Creating branches¶
To create a new branch, make sure that your current branch is the one you want to branch from. Suppose you have the following branches in your KB:
Now suppose that you want to create branch_3_1
from branch branch_3
. To do so, start by switching to branch_3
by using the qruise kb checkout
command:
Listing branches again should now show that branch_3
is the active branch:
You can now execute the following to create branch_3_1
:
After the above command finishes, you can list the branches again to see the newly created one:
Note, however, that creating a branch using qruise kb branch
does not result in checking out to it.
Deleting a branch¶
Suppose you have the following branches present in KB:
To delete a branch, say branch_3
, start by checking out to a different branch. The exact branch does not matter, but qruise
will not allow you to delete a branch you're currently on:
Hence begin by checking out to a different branch:
Now you can safely remove branch_3
:
You can verify that the branch was removed by listing the branches: