Skip to main content

Command Overview

All commands are available in two modes:
  • CLI: brv vc <command> [args] [flags]
  • TUI (REPL): /vc <command> [args] [flags]
Both modes accept the same arguments and flags. The examples below use the CLI format — replace brv vc with /vc for TUI usage.

Setup Commands

vc init

Initialize version control for the current space.
brv vc init
ArgumentsNone
FlagsNone
ReturnsGit directory path, whether it was reinitialized
PrerequisitesA ByteRover space must exist (.brv/ directory)
Safe to re-run — reports “reinitialized” without losing history. Errors: ALREADY_INITIALIZED

vc config

Get or set commit author identity. Configuration is local to the current space — each space maintains its own author identity.
brv vc config <key> [value]
ArgumentRequiredDescription
keyYesuser.name or user.email
valueNoValue to set. Omit to read the current value
Set a value:
brv vc config user.name "Alice Chen"
brv vc config user.email "alice@example.com"
Read a value:
brv vc config user.name
# Output: Alice Chen

brv vc config user.email
# Output: alice@example.com
Errors: INVALID_CONFIG_KEY, CONFIG_KEY_NOT_SET, GIT_NOT_INITIALIZED

vc clone

Clone a remote space from ByteRover cloud.
brv vc clone <url>
ArgumentRequiredDescription
urlYes (optional in TUI)https://byterover.dev/<team>/<space>.git
ReturnsGit directory, team name, space name
Timeout120 seconds
TUI onlyOmit URL to open an interactive space picker
brv vc clone https://byterover.dev/acme/project.git
Errors: CLONE_FAILED, AUTH_FAILED, INVALID_REMOTE_URL

Staging & History Commands

vc add

Stage files for the next commit.
brv vc add [files...]
ArgumentRequiredDescription
filesNoFile or directory paths to stage. Defaults to . (everything)
Accepts zero or more paths. Paths are relative to the context tree root.
brv vc add .                                  # stage everything
brv vc add notes.md                           # stage one file
brv vc add design/architecture.md docs/       # stage multiple paths
brv vc add authentication/                    # stage an entire directory
Errors: GIT_NOT_INITIALIZED, FILE_NOT_FOUND

vc commit

Save staged changes as a commit.
brv vc commit -m "<message>"
FlagRequiredDescription
-m, --messageYesCommit message (no auto-generation)
ReturnsShort SHA (7 characters) and commit message
Prerequisitesuser.name and user.email configured, at least one file staged
brv vc commit -m "add JWT token rotation patterns"
brv vc commit -m "reorganize database domain into separate topics"
Errors: USER_NOT_CONFIGURED, NOTHING_STAGED, GIT_NOT_INITIALIZED

vc status

Show working tree status.
brv vc status
ArgumentsNone
FlagsNone
Returns:
FieldDescription
Current branchThe branch you are on
Tracking infoAhead/behind upstream count
Merge stateWhether a merge is in progress
Staged changesFiles ready to commit
Unstaged changesModified files not yet staged
Untracked filesNew files not being tracked
Unmerged pathsFiles with conflicts during a merge
Conflict markersFiles containing <<<<<<</=======/>>>>>>>

vc log

Show commit history.
brv vc log [branch] [--all] [--limit N]
ArgumentRequiredDescription
branchNoShow history for a specific branch
FlagDefaultDescription
--all, -afalseShow commits from all branches
--limit10Maximum number of commits to display
Each log entry includes: SHA, message, author (name + email), timestamp.
brv vc log                        # last 10 commits on current branch
brv vc log --limit 20             # last 20 commits
brv vc log feature/auth           # history of a specific branch
brv vc log --all                  # all branches
brv vc log --all --limit 50       # combine flags
Errors: NO_COMMITS, BRANCH_NOT_FOUND, GIT_NOT_INITIALIZED

vc reset

Unstage files or undo commits.
brv vc reset [files...]           # unstage files
brv vc reset --soft [ref]         # undo commits, keep staged (ref defaults to HEAD)
brv vc reset --hard [ref]         # reset working tree & staging (ref defaults to HEAD)
ArgumentRequiredDescription
filesNoSpecific files to unstage
FlagDescription
--softMove HEAD back, keep changes in staging area
--hardMove HEAD back, discard all changes (destructive)
--soft and --hard are mutually exclusive.
ModeHEADStagingWorking Tree
No flagsUnchangedClearedUnchanged
--softMoved backPreservedUnchanged
--hardMoved backClearedCleared
brv vc reset                       # unstage all files
brv vc reset notes.md              # unstage specific file
brv vc reset --soft HEAD~1         # undo last commit, keep staged
brv vc reset --soft HEAD~3         # undo last 3 commits, keep staged
brv vc reset --hard                # discard all uncommitted changes
brv vc reset --hard HEAD~1         # undo last commit, discard changes
Errors: INVALID_REF, NOTHING_TO_RESET, GIT_NOT_INITIALIZED

Branching Commands

vc branch

List, create, or delete branches.
brv vc branch [name] [flags]
ArgumentRequiredDescription
nameNoBranch name to create
FlagDescription
-a, --allList all branches including remote-tracking
-d, --deleteDelete a branch by name
--set-upstream-toSet upstream tracking for current branch (e.g., origin/main)
List branches:
brv vc branch                                # local branches (* = current)
brv vc branch -a                             # all branches including remote
Create a branch:
brv vc branch feature/new                    # create (doesn't switch to it)
Delete a branch:
brv vc branch -d feature/old                 # delete (can't delete current)
Set upstream:
brv vc branch --set-upstream-to origin/main  # link to remote branch
Errors: BRANCH_ALREADY_EXISTS, BRANCH_NOT_FOUND, BRANCH_NOT_MERGED, CANNOT_DELETE_CURRENT_BRANCH, INVALID_BRANCH_NAME

vc checkout

Switch to an existing branch, or create and switch in one step.
brv vc checkout <branch> [-b] [--force]
ArgumentRequiredDescription
branchYesBranch to switch to (or create with -b)
FlagDefaultDescription
-b, --createfalseCreate the branch before switching
--forcefalseDiscard uncommitted changes and force switch
brv vc checkout main                         # switch to main
brv vc checkout -b feature/new-branch        # create and switch
brv vc checkout --force main                 # discard changes and switch
Errors: BRANCH_NOT_FOUND, UNCOMMITTED_CHANGES, BRANCH_ALREADY_EXISTS (with -b)

vc merge

Merge a branch into the current branch.
brv vc merge [branch] [-m "message"] [--abort] [--continue] [--allow-unrelated-histories]
ArgumentRequiredDescription
branchNoBranch to merge (not needed with --abort/--continue)
FlagDescription
-m, --messageCustom merge commit message
--abortCancel current merge and restore pre-merge state
--continueComplete merge after resolving conflicts
--allow-unrelated-historiesAllow merging branches with no common ancestor
--abort and --continue are mutually exclusive. Start a merge:
brv vc merge feature/auth                     # merge with default message
brv vc merge -m "merge auth" feature/auth     # custom commit message
Handle conflicts:
brv vc merge --continue                       # opens editor for message
brv vc merge --continue -m "resolve conflicts" # inline message
brv vc merge --abort                          # cancel the merge
Unrelated histories:
brv vc merge --allow-unrelated-histories imported/legacy
Errors: MERGE_CONFLICT, MERGE_IN_PROGRESS, NO_MERGE_IN_PROGRESS, CONFLICT_MARKERS_PRESENT, ALLOW_UNRELATED_HISTORIES

Remote Commands

vc remote

Show, add, or update the remote connection.
brv vc remote                           # show current remote
brv vc remote add <name> <url>          # add a new remote
brv vc remote set-url <name> <url>      # update existing remote URL
Only origin is supported as a remote name. URLs must match: https://byterover.dev/<team>/<space>.git Show:
brv vc remote
# Output: https://byterover.dev/acme/project.git
Add:
brv vc remote add origin https://byterover.dev/acme/project.git
Update:
brv vc remote set-url origin https://byterover.dev/acme/new-project.git
Errors: REMOTE_ALREADY_EXISTS, INVALID_REMOTE_URL, NO_REMOTE

vc fetch

Fetch refs from ByteRover cloud without modifying local branches.
brv vc fetch [remote] [branch]
ArgumentRequiredDescription
remoteNoRemote name (origin only). Defaults to origin
branchNoSpecific branch to fetch. Defaults to all branches
Timeout120 seconds
EffectUpdates remote-tracking branches only; working tree unchanged
brv vc fetch                     # fetch all branches
brv vc fetch origin              # same as above (origin is default)
brv vc fetch origin main         # fetch only the main branch
Errors: FETCH_FAILED, NO_REMOTE, AUTH_FAILED

vc pull

Pull commits from ByteRover cloud (fetch + merge).
brv vc pull [remote] [branch] [--allow-unrelated-histories]
ArgumentRequiredDescription
remoteNoRemote name (origin only). Defaults to origin
branchNoBranch to pull. Defaults to upstream of current branch
FlagDefaultDescription
--allow-unrelated-historiesfalseAllow merging unrelated histories
Timeout120 seconds
EffectFetches and merges into current branch
brv vc pull                                              # pull from upstream
brv vc pull origin main                                  # pull specific branch
brv vc pull --allow-unrelated-histories origin main      # merge unrelated
Errors: PULL_FAILED, NO_REMOTE, NO_UPSTREAM, MERGE_CONFLICT, AUTH_FAILED

vc push

Push commits to ByteRover cloud.
brv vc push [remote] [branch] [-u]
ArgumentRequiredDescription
remoteNoRemote name (origin only). Defaults to origin
branchNoBranch to push. Defaults to current branch
FlagDefaultDescription
-u, --set-upstreamfalseSet remote branch as upstream tracking
Timeout120 seconds
ReturnsBranch name, up-to-date status, upstream-set status
Push semantics:
brv vc push                          # current branch → upstream
brv vc push -u origin main            # push main and set upstream tracking
brv vc push origin                   # current branch → origin
brv vc push origin feat/x            # feat/x → origin
brv vc push feat/x                   # ERROR: "feat/x" is not a valid remote
Errors: PUSH_FAILED, NON_FAST_FORWARD, NOTHING_TO_PUSH, NO_REMOTE, NO_UPSTREAM, AUTH_FAILED

Error Code Reference

Complete list of error codes across all commands:

Initialization Errors

Error CodeDescriptionSolution
ALREADY_INITIALIZEDVC already set upSafe to ignore
GIT_NOT_INITIALIZEDVC not initializedRun vc init

Configuration Errors

Error CodeDescriptionSolution
USER_NOT_CONFIGUREDAuthor identity not setSet user.name and user.email with vc config
CONFIG_KEY_NOT_SETRequested key has no valueSet it with vc config <key> <value>
INVALID_CONFIG_KEYKey is not user.name or user.emailUse a supported key

Staging & Commit Errors

Error CodeDescriptionSolution
NOTHING_STAGEDNo files in staging areaStage files with vc add
NOTHING_TO_RESETNo changes to unstageWorking tree is clean
FILE_NOT_FOUNDSpecified file doesn’t existCheck the file path
INVALID_REFGit ref doesn’t existVerify with vc log
NO_COMMITSNo commits in historyCreate your first commit

Branch Errors

Error CodeDescriptionSolution
BRANCH_NOT_FOUNDBranch doesn’t existCheck names with vc branch
BRANCH_ALREADY_EXISTSBranch name is takenChoose a different name
CANNOT_DELETE_CURRENT_BRANCHOn the branch being deletedSwitch to another branch first
BRANCH_NOT_MERGEDBranch has unmerged commitsMerge the branch first, or verify you no longer need those commits
INVALID_BRANCH_NAMEInvalid characters in nameUse alphanumeric, /, -, _, .
UNCOMMITTED_CHANGESUncommitted changes block operationCommit changes or use --force
NO_BRANCH_RESOLVEDCould not determine which branch to operate onSpecify the branch explicitly or check out a branch first

Merge Errors

Error CodeDescriptionSolution
MERGE_CONFLICTConflicting changes detectedResolve conflicts, then vc merge --continue
MERGE_IN_PROGRESSA merge is already underway--continue or --abort first
NO_MERGE_IN_PROGRESSNo active merge to continue/abortNothing to do
CONFLICT_MARKERS_PRESENTUnresolved markers in filesRemove all <<<<<<</=======/>>>>>>> markers
UNRELATED_HISTORIESNo common ancestor between branchesAdd --allow-unrelated-histories flag

Remote & Sync Errors

Error CodeDescriptionSolution
NO_REMOTENo remote configuredvc remote add origin <url>
REMOTE_ALREADY_EXISTSRemote origin already setUse vc remote set-url to update
INVALID_REMOTE_URLURL format is wrongUse https://byterover.dev/<team>/<space>.git
NO_UPSTREAMNo upstream tracking branchUse vc push -u origin <branch> or vc branch --set-upstream-to
NON_FAST_FORWARDRemote has newer commitsPull first, resolve conflicts, then push
NOTHING_TO_PUSHNo new local commitsAlready up to date
CLONE_FAILEDClone operation failedCheck URL and network connection
FETCH_FAILEDFetch operation failedCheck network connection
PULL_FAILEDPull operation failedCheck network connection
PUSH_FAILEDPush operation failedCheck network connection
NETWORK_ERRORNetwork connectivity issueCheck your internet connection and try again
AUTH_FAILEDAuthentication failedLog in with brv login and verify access

Legacy Command Errors

Error CodeDescriptionSolution
VC_GIT_INITIALIZEDLegacy brv push/brv pull used after vc initUse brv vc push / brv vc pull instead. See Migration