Manpage logo

bk-repogca - (unknown subject)


NAME
bk repogca − show greatest common ancestor across a set of repositories

SYNOPSIS
bk repogca
[−dspec] [−5kS] [repo repo ...]

DESCRIPTION
This command will print the latest revision in the current repository that exists in all of the the remote repositories either listed on the command line or implied in the parent pointer[s]. By default, `bk parent` is the remote repository.

OPTIONS
−d
spec Use spec as the specification for displaying the revision.
−−dspecf=
file Like −d but read the dspec from a file.
−5
A short hand for asking for a spec of “:MD5KEY:”.
−k
A short hand for asking for a spec of “:KEY:”.
−S
In a component in a nested collection, produce the repo gca of the component instead of the repo gca of the product.

EXAMPLES
To generate a traditional patch for the changes that exist only in the local repository:

bk export -tpatch -r`bk repogca`,+ > patch

To throw away all local work that doesn’t exist in a remote repository:

bk undo -a`bk repogca URL`

Warning: This might also throw away some local csets which also exist in the remote repository. That can happen if there are multiple common ancestors on different branches. The ancestor chosen is the one created most recently.

SEE ALSO
bk-gca, bk-log

CATEGORY
Utility


Updated 2026-06-01 - jenkler.se | uex.se