git

vb git SUBCOMMAND [OPTIONS]

Description

Do incremental import or export operations between VisionByte and Git.

Subcommands

vb git export

vb git export [MIRROR] [OPTIONS]

Description

Write content from the VisionByte repository into the Git repository in directory MIRROR. The Git repository is created if it does not already exist. If the Git repository does already exist, then new content added to vb since the previous export is appended.

Repeat this command whenever new check-ins are added to the VisionByte repository in order to reflect those changes into the mirror. If the MIRROR option is omitted, the repository from the previous invocation is used.

The MIRROR directory will contain a subdirectory named .mirror_state that contains information that VisionByte needs to do incremental exports. Do not attempt to manage or edit the files in that directory since doing so can disrupt future incremental exports.

Options

--autopush URL

Automatically do a git push to URL. The URL is remembered and used on subsequent exports to the same repository. Or if URL is off the auto-push mechanism is disabled

--debug FILE

Write fast-export text to FILE rather than piping it into git fast-import

-f, --force

Do the export even if nothing has changed

--if-mirrored

No-op if the mirror does not already exist

--limit N

Add no more than N new check-ins to MIRROR. Useful for debugging

--mainbranch NAME

Use NAME as the name of the main branch in Git. The trunk branch of the VisionByte repository is mapped into this name. master is used if this option is omitted.

-q, --quiet

Reduce output. Repeat for even less output.

-v, --verbose

More output

vb git import

vb git import MIRROR

Description

TBD…

vb git status

vb git status [-q|--quiet]

Description

Show the status of the current Git mirror, if there is one. No output if there is nothing to report used with –quiet.

Examples

  • Export to a new Git mirror

$ vb git export mirror
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint: 	git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint: 	git branch -m <name>
Initialized empty Git repository in /tmp/sphinx_tests/ba4735c6/git_repo/mirror/.git/
git init /tmp/sphinx_tests/ba4735c6/git_repo/mirror
git symbolic-ref --short HEAD
git fast-import --export-marks=.mirror_state/marks.txt --quiet --done
1/2      
2/2      
2 check-ins added to the /tmp/sphinx_tests/ba4735c6/git_repo/mirror
git update-ref "refs/heads/master" 01df8da0aea9c4665c20d38509acff98ba3d331e
git repack -adf
  • Export again (incremental)

$ vb git export mirror
git fast-import --export-marks=.mirror_state/marks.txt --quiet --done
1/1      
1 check-ins added to the /tmp/sphinx_tests/ba4735c6/git_repo/mirror
git update-ref "refs/heads/master" eb96ea8fe351f5c4ec70640224daa114faea0f03
  • Show Git mirror status

$ vb git status -q
Git mirror:  /tmp/sphinx_tests/ba4735c6/git_repo/mirror
Last export: 2026-03-31 13:00:20 (moments ago)
Autopush:    off
Main-Branch: master
Status:      up-to-date
Exported:    3 check-ins and 2 file blobs