Git X-Modules CLI Built-in Demo

The easiest way to try out Git X-Modules CLI is to use a built-in demo. It will automatically create several Git repositories and sync them with X-Modules. All you will have to do is push and pull!

  1. Download Git X-Modules CLI from TMateSoft website.

  2. Depending on your OS - unpack .zip or install .deb.
    If you do not have Java runtime installed on your computer - also download and install Java.

    If necessary, add gx/bin to your PATH environmental variable.

  3. Run

    $ gx demo [OPTIONS] DEMO_PATH

    where DEMO_PATH is the path to an empty directory, where you would like demo repositories to be created.

    If you would like a more hands-on experience, use --repos-only option:

    $ gx demo --repos-only DEMO_PATH

    It will create demo repositories, but not sync them with X-Modules, and print the instructions for you to create X-Modules yourself.

    For the whole list of available options, see Git X-Modules Reference Guide

  4. The following bare repositories will be created in the specified directory:

  • parent.git
  • app.git
  • libraryA.git
  • libraryB.git
  1. By default, three X-Modules will be created within parent.git:


    These directories within parent are synced with the corresponding external repositories.

    If you used --repos-only option, then these X-Modules are not created, and you should do it yourself, according to the instructions.

  2. Now try this out!

  • Clone parent.git and push something to one of the X-Modules. Your changes should immediately appear in the corresponding external repository.

    For example, if you add a file to parent/app, and push your changes to parent.git, your changes will be also pushed to app.git.

  • Clone app.git and push something there. Then run

    $ gx sync DEMO_PATH/parent.git 

    Where DEMO_PATH is the path to the directory, where your demo repositories have been created.

    Your changes will be pulled to the /app directory in the parent repository.

Have fun!

For more information, read the Git X-Modules documentation.
Or, if you get stuck, feel free to ask a question at this forum!