qruise kb reset
Reset the current HEAD to a specified state.
Syntax¶
Description¶
The qruise kb reset
command resets a branch to a specific point in time by moving the HEAD pointer. The exact point in time can be specified by either a branch or a commit.
Arguments¶
Argument | Description |
---|---|
REF |
Reference identifier. Can be commit ID or branch name. |
Options¶
Option |
Description |
---|---|
|
Reset both HEAD and the KB state. |
|
Reset current branch to the initial commit of the database. Cannot be used at the same time as commit identifier. |
|
Qruise KB profile name. |
|
Specify path to the Qruise profiles file. |
|
Override database name. |
|
Override organization name. |
|
Show a help message and exit. |
Examples¶
Resetting to a commit¶
Resetting to a commit is probably the most common way of reverting to an earlier point in time. Suppose your branch history has the following structure as revealed by the qruise kb log
command:
$ qruise kb log
commit hwjuo1p1ujy867ckgf9hs00nlci8wfz
Author: paul
Date: 2025-02-11, 21:03:32
Updated schema: added new measurement classes
commit t1yaqfme6y3d26mtaxejjhprnxp9da9
Author: paul
Date: 2025-01-21, 15:08:47
RB experiments
commit gggzxysrse8ybh2aapra7dhzst4kehr
Author: jane
Date: 2025-01-17, 10:57:42
New calibration procedure
commit 6baxf2oivddxwd31rxqs0whybvadrxr
Author: emily
Date: 2025-01-17, 09:54:37
Merge batch-2025-01-17_08-51-10
commit cjfpmjpr68zzw806bva88s53xaj27ep
Author: oscar
Date: 2025-01-16, 16:35:10
Updated schema
If you want to reset your branch status to the commit with ID gggzxysrse8ybh2aapra7dhzst4kehr
(third from the top in the list above), simply run:
After running the above, the log will have the following structure:
$ qruise kb log
commit gggzxysrse8ybh2aapra7dhzst4kehr
Author: jane
Date: 2025-01-17, 10:57:42
New calibration procedure
commit 6baxf2oivddxwd31rxqs0whybvadrxr
Author: emily
Date: 2025-01-17, 09:54:37
Merge batch-2025-01-17_08-51-10
commit cjfpmjpr68zzw806bva88s53xaj27ep
Author: oscar
Date: 2025-01-16, 16:35:10
Updated schema
Resetting to a branch¶
If you want your branch to be exactly the same as another, you can use the qruise kb reset
command. Suppose you have the following branches:
If you want the current branch (branch_2
) to be exactly like branch_1
, simply run: