Syntax
pmgit <subcommand> [arguments]
Description
The pmgit utility is a tool that can mediate version control operations between Subversion (SVN) and Git version control systems.
For more information on the pmgit policy management concept, see Managing policies in Git.
The pmgit utility has several subcommands, each with its own set of options and arguments. For each subcommand, pmgit returns 0 if the operation succeeds or 1 if an error occurred.
For more information on the subcommands, see:
The following topics describe pmgit subcommands and their arguments.
Topics:
This subcommand exports the current policies from the SVN policy repository to a Git policy repository, and has the following arguments:
--git-url
Alias |
-g |
Type |
string |
Value |
<git-policy-repository-url> |
Default |
N/A |
Description: Sets the URL of the Git policy repository. The policy repository must be an empty bare repository, or Git will reject the operation.
Syntax
--git-url <git-policy-repository-url>
--branch
Alias |
-b |
Type: |
string |
Values: |
<branch-of-policy-files> |
Default: |
master |
Description: Sets the Git branch where the policy files are stored. If this argument is not specified, policies are exported to the default branch (master).
Syntax
--branch <branch-of-policy-files>
Example for exporting an SVN policy repository
In this example, the SVN policy repository is exported to the exported_policies.git Git policy repository. The URL to the Git policy repository is https://github.com/user/exported_policies.git, and the policies are exported to the main branch.
pmgit export --git-url https://github.com/user/exported_policies.git --branch main
This subcommand imports policies from an existing Git policy repository and commits the files on top of the trunk in the SVN policy repository.
--git-url
Alias |
-g |
Type |
string |
Value |
<git-policy-repository-url> |
Default |
N/A |
Description: Sets the URL of the Git policy repository. The policy repository must be an existing repository, containing the policy files.
Syntax
--git-url <git-policy-repository-url>
--branch
Alias |
-b |
Type: |
string |
Values: |
<branch-of-policy-files> |
Default: |
master |
Description: Sets the Git branch where the policy files are stored. If this argument is not provided, policies are imported from the default branch (master).
Syntax
--branch <branch-of-policy-files>
Examples
In this example, an existing Git policy repository is imported from the URL https://github.com/user/exported_policies.git. The branch in this example is not specified by an argument, so the policies are imported from default (master) branch.
pmgit import --git-url https://github.com/user/policies_to_import.git