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!
-
Download Git X-Modules CLI from TMateSoft website.
-
Depending on your OS - unpack
.zipor install.deb.
If you do not have Java runtime installed on your computer - also download and install Java.If necessary, add
gx/binto your PATH environmental variable. -
Run
$ gx demo [OPTIONS] DEMO_PATHwhere
DEMO_PATHis 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-onlyoption:$ gx demo --repos-only DEMO_PATHIt 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
-
The following bare repositories will be created in the specified directory:
parent.gitapp.gitlibraryA.gitlibraryB.git
-
By default, three X-Modules will be created within
parent.git:/parent /app /libraryA /libraryBThese directories within
parentare synced with the corresponding external repositories.If you used
--repos-onlyoption, then these X-Modules are not created, and you should do it yourself, according to the instructions. -
Now try this out!
-
Clone
parent.gitand 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 toparent.git, your changes will be also pushed toapp.git. -
Clone
app.gitand push something there. Then run$ gx sync DEMO_PATH/parent.gitWhere
DEMO_PATHis the path to the directory, where your demo repositories have been created.Your changes will be pulled to the
/appdirectory in theparentrepository.
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!