Repository Management
Repositories in WDG are project-scoped. Each project keeps its own repositories under projects/<project>/repositories/, with isolated git histories. There is no central/shared repository store and no top-level wdg repo command — every repository operation runs against a specific project using the project-first grammar:
wdg <project> repo <action> [options]Available actions: add, remove, list, attach, sync, status, hooks, init.
Add a Repository
wdg <project> repo add <url> [branch] [options]Clones a git repository into the project, wires it into docker-compose.override.yml as a mount so the WordPress container can see it, runs composer install for any composer.json found, installs git hooks, and indexes the code.
Options:
--type=theme|plugin|wp-content|none— override the auto-detected mount type--mount-name=<name>— override the directory name underwp-content/themesorwp-content/plugins(default: repo name)--skip-mount— same as--type=none(clone without mounting)--skip-composer— skip thecomposer installscan--skip-restart— do not restart the WordPress container afterward
If --type is omitted, WDG auto-detects the repo type (theme, plugin, wp-content, or full WordPress install). A full install is mounted as wp-content. If detection fails, nothing is mounted and you are prompted to re-run with an explicit --type.
Examples:
# Add a plugin (default branch)
wdg my-site repo add https://github.com/client/custom-plugin
# Add a specific branch
wdg my-site repo add https://github.com/client/theme develop
# Add over SSH
wdg my-site repo add git@github.com:client/plugin.git
# Force a mount type and directory name
wdg my-site repo add https://github.com/client/theme --type=theme --mount-name=client-theme
# Clone without mounting or restarting
wdg my-site repo add https://github.com/client/lib --skip-mount --skip-restartList Repositories
wdg <project> repo listShows each repository in the project with its current branch and whether it has uncommitted changes.
Repository Status
wdg <project> repo statusShows git status -sb for every repository in the project.
Sync (Pull) Repositories
# Sync all repositories in the project
wdg <project> repo sync
# Sync a single repository
wdg <project> repo sync <repo-name>Runs git pull in each repository. Reports a failure (non-zero exit) if any pull fails.
Examples:
wdg my-site repo sync
wdg my-site repo sync wikit-coreInitialize a Repository
wdg <project> repo init <repo-name>Initializes an existing project directory as a git repository: runs git init, scaffolds a .gitignore and README.md if missing, creates an initial commit, and installs git hooks. The directory must already exist under the project's repositories/.
wdg my-site repo init my-site-themeInstall Git Hooks
wdg <project> repo hooks <repo-name>(Re)installs the platform git hooks in a repository. The hooks trigger automatic re-indexing on commit and merge.
wdg my-site repo hooks my-site-themeAttach an External Repository
wdg <project> repo attach <path> [--type=<type>]Mounts a repository that lives outside the project's repositories/ directory into the project's WordPress container, without copying it. Useful for working on a repo checked out elsewhere on disk.
Mount types (--type, default wp-content):
| Type | Mount Point |
|---|---|
wp-content | /var/www/html/wp-content |
theme | /var/www/html/wp-content/themes/<name> |
plugin | /var/www/html/wp-content/plugins/<name> |
Attaching also generates a docker-compose.override.yml that mounts the Wikit framework plugins/theme alongside the attached repo, installs git hooks if the path is a git repo, and restarts the project if it is running.
Examples:
wdg my-site repo attach /path/to/repo --type=wp-content
wdg my-site repo attach /path/to/plugin --type=plugin
wdg my-site repo attach ../shared-theme --type=themeRemove a Repository
wdg <project> repo remove <repo-name>Deletes the repository from the project, regenerates docker-compose.override.yml so its mount disappears, and restarts the WordPress container if it is running.
wdg my-site repo remove custom-pluginCommon Workflows
Add a client plugin and start working
wdg my-site repo add https://github.com/client/custom-plugin --type=plugin
wdg my-site devKeep all project repos up to date
wdg my-site repo sync
wdg my-site repo statusPromote a local directory to a tracked repo
wdg my-site repo init my-site-theme
wdg my-site repo hooks my-site-themeSee Also: