Clone streams

This command creates a new Git repository from one or more Dimensions CM streams.

git clone <URL> <directory>

Options

Option Description
--depth

Specifies the depth of a clone.

For example, clone the last three changesets from the stream QLARIUS:SAVINGS stream into your Git repository C:\temp\savings:

git clone –depth=3 dimensions://cmserver/cm_typical@dim14/qlarius/savings C:\temp\savings
--shallow-since

Clones from a specific date.

For example, clone the changesets created since Monday January 13th 2020 at 17:00 GMT from the stream QLARIUS:SAVINGS into your Git repository C:\temp\savings:

git clone --shallow-since="Mon Jan 13 17:00:00 2020 +0100" dimensions://cmserver/cm_typical@dim14/qlarius/savings C:\temp\savings

Examples

  • Clone the stream SAVINGS and all its child topic streams in the product QLARIUS from the Dimensions CM server cmserver and the base database cm_typical@DIM14. The content of the stream is cloned into a new Git repository in the folder C:\temp\savings. The command should prompt for credentials when first used.
    git clone dimensions://cmserver/cm_typical@dim14/qlarius/savings C:\temp\savings
  • Clone the folder Documents from the stream SAVINGS in the product QLARIUS using the Dimensions CM server cmserver and the base database cm_typical@DIM14. The contents of the folder in the stream are cloned into a new Git repository in the local folder C:\temp\savings. The command is performed as the user dinesh.
    git clone dimensions://dinesh:<password>@cmserver/cm_typical@dim14/qlarius/savings/Documents C:\temp\savings
  • Clone the stream MAINLINE_JAVA_STR and all of its child streams in the product QLARIUS using the Dimensions CM server cmserver and the base database cm_typical@DIM14. The contents of the stream MAINLINE_JAVA_STR are cloned into a new Git repository in the local folder C:\temp\work. Each child stream is cloned into a separate branch in the Git repository.
    git clone dimensions://cmserver/cm_typical@dim14/qlarius/mainline_java_str/* C:\temp\work

Back to top

Cloning multiple streams

If you have multiple streams you can clone them in one operation. For example, your team has a collection of streams that they frequently clone.

  1. Create a .git text file, for example: myStreams.git
  2. Add each stream to the file on a separate line in the format <PRODUCT>:<STREAM NAME>, for example:
  3. QLARIUS:PARENT_STREAM

    QLARIUS:CHILD_STREAM

    The first stream in the list becomes the master branch in Git.

  4. Deliver the .git text file to a Dimensions CM stream.
  5. Use the .git text filename in the Git command, for example:
  6. git clone dimensions://myserver/mydatabase@dbconn/qlarius/mystream/myStreams.git

Specifying multiple streams

Use wildcards to specify multiple streams, for example:

QLARIUS:OTHER*

QLARIUS:*JAVA*

  • If your team is using the same collection of steams, they can share the .git text file.
  • All topic streams owned by the current user and branched from the specified master stream are also cloned.

Back to top