The gitcentric config_branch command enables you to configure Git branches and refs for use with GitCentric.


gitcentric config-branch
[--branch <ref> | -b <ref>] [--clear] [--noNotify] [--description <description>]
[--initialSync <direction>] [--mountElement <mount_elem>] [--stream <stream>]
[--help] [<reponame>...] [--children-of <reponame>] [--]

Specify one or more repositories to configure with arguments <repo_1> through <repo_n>, or specify all the children of a parent repository with --children-of <reponame>.

Note: You must use the config-repo command before you can map a repo’s branches to AccuRev streams.


--branch <ref>, -b <ref> (Required.) Specify the branch or the ref to configure. If you have specified multiple repos, config-branch displays an error when it encounters a repo where the branch does not exist, but proceeds for those repos where the branch does exist. This option accepts branch specifications in either long form, refs/heads/branch_XYZ, or short form, branch_XYZ, but saves the information in long form.
--children-of <reponame> Configure all the immediate children of the specified parent repo. (Children of children will not be configured.) This option is not intended for initial configuration, where you are unlikely to want to map multiple branches all to the same element in the same AccuRev stream. Rather, it is intended for maintenance, where you want to change the same configuration setting for many repos with a single operation.

Note: If you specify repos in the argument list and with the --children-of option, the command operates on all repos.

--clear Remove the branch mapping.
--description <description>, -d <description> A text string describing this branch mapping. See Spaces and Quoting for more information.
--help, -h Display the help for this command.
--initialSync <direction> Specify the direction which should be used by the first synchronization when mapping between a Git repo and an AccuRev stream. Valid values are case-insensitive and include:
  • accurev -- (Default) Use this option if you are creating a new Git repo and will be populating it by mapping its branch to an existing AccuRev stream.
  • git -- Use this option if you are you are mapping an existing Git branch to an unpopulated directory in an AccuRev stream.
--mountElement <mount_elem>, -e <mount_elem> The name or numeric ID of the AccuRev directory element that the Git branch is mapped to. If the mount element is unspecified, GitCentric uses the forward slash / as the default root mount point. If you wish to specify the root mount point manually, you must use the forward slash /. You cannot use the backward slash \ or period ..
--noNotify Do not notify the GitCentric bridge of the configuration change. This is useful if you are making a series of configuration changes and do not want to reconfigure the bridge until they are all done. You do this by omitting --noNotify on the last command. If you forget to omit --noNotify on the last command, you can force the commit by either executing a config-repo or config-branch command, or by restarting the bridge (such as through the Tomcat web server admin console).
--stream, -s <stream> The name of the AccuRev stream to map the branch to.

Note: stream IDs are not accepted.

-- End-of-options marker. See Basic Syntax for more details.


Example: Initial Configuration

Map a branch named branch_XYZ which exists in a repository named new_repo2 to the mount point directory added_folder which exists in an AccuRev stream named agc_domestic.

>ssh -p 29418 mylogin@myGCserver gitcentric config-branch -b branch_XYZ
-s agc_domestic -e /./agc_devel_folder1/added_folder new_repo2

Example: Maintenance

Change the configuration for a repository named new_repo2 as well as all the children of parent-only repository test_parent, to clear all of the existing mappings between branches and streams.

>ssh -p 29418 mylogin@myGCserver gitcentric config-branch --clear
--children-of test_parent_1 new_repo2


Any member of the Project-Owners or Administrators groups.

Back to top

See also: