Skip to content

How to Work with Wok Submodules

Aline Manera edited this page Dec 2, 2015 · 5 revisions

Wok provides some few plugins as Git submodules located in the src/wok/plugins directory. Git submodules allow you to keep a second Git repository as a subdirectory of another Git repository. This lets you clone Kimchi (Virtualization Management plugin) and Ginger (System Administration plugin) repositories into your local Wok repository and keep your commits separate.

To work with any of these submodules, it's necessary execute some basic steps, specially if you are planning to develop to any of these submodules in a full environment. Let's use Ginger as the submodule repository as example. After you have cloned the Wok project, all submodules will be located in the src/wok/plugins path but all them as empty directories.

To clone all the submodules repositories under src/wok/plugins, doo:

$ git submodule init
$ git submodule update --remote

To clone only a specific submodule repository, do:

# For example, to clone Ginger submodule use src/wok/plugins/ginger as 'submodule-path'
$ git submodule init <submodule-path>
$ git submodule update --remote

Wok will only update the submodules references some days prior an official release. So on main time, PLEASE, always use the --remote option to get the most recent changes for each submodule.

As Wok is tracking the master branch for each submodule, so once, you run:

$ git submodule update --remote

All the submodules will be updated according to their master branch.

Clone this wiki locally