| title | Git Submodule Installation | |||||
|---|---|---|---|---|---|---|
| description | Set up HVE-Core as a git submodule for version-controlled team consumption | |||||
| author | Microsoft | |||||
| ms.date | 2025-12-02 | |||||
| ms.topic | how-to | |||||
| keywords |
|
|||||
| estimated_reading_time | 7 |
Git submodules provide version-controlled, reproducible HVE-Core consumption. Every team member gets the exact same version, and updates are explicit commits.
✅ Use this when:
- Your team needs reproducible setups (same version for everyone)
- You want to pin HVE-Core to a specific version
- Updates should be deliberate, reviewed commits
- HVE-Core dependency should be tracked in version control
❌ Consider alternatives when:
- You want automatic updates → Multi-Root Workspace
- You're a solo developer without version pinning needs → Multi-Root Workspace
A git submodule embeds HVE-Core as a nested repository within your project. The .gitmodules file tracks the repository URL, and your project's git history tracks the exact commit.
your-project/
├── .gitmodules ← Defines submodule URL
├── lib/
│ └── hve-core/ ← Submodule (points to specific commit)
│ └── .github/
│ ├── agents/
│ ├── prompts/
│ └── instructions/
└── .vscode/
└── settings.json ← Points to lib/hve-core paths
Use the hve-core-installer agent:
- Open GitHub Copilot Chat (
Ctrl+Alt+I) - Select
hve-core-installerfrom the agent picker - Say: "Install HVE-Core using git submodule"
- Follow the guided setup
# From your project root
git submodule add https://github.com/microsoft/hve-core.git lib/hve-core
git commit -m "Add HVE-Core as submodule"This creates a .gitmodules file:
[submodule "lib/hve-core"]
path = lib/hve-core
url = https://github.com/microsoft/hve-core.git
branch = mainCreate or update .vscode/settings.json:
Update .devcontainer/devcontainer.json to initialize submodules automatically:
{
"name": "My Project with HVE-Core",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"onCreateCommand": "git submodule update --init --recursive",
"customizations": {
"vscode": {
"extensions": [
"github.copilot",
"github.copilot-chat"
]
}
}
}When team members clone your project, they need to initialize submodules.
Option A: Clone with submodules (recommended):
git clone --recurse-submodules https://github.com/your-org/your-project.gitOption B: Initialize after clone:
git clone https://github.com/your-org/your-project.git
cd your-project
git submodule update --init --recursiveOption C: Configure git to auto-recurse:
git config --global submodule.recurse true
# Now all git operations auto-update submodules| Task | Command |
|---|---|
| Check for updates | cd lib/hve-core && git fetch && git log HEAD..origin/main --oneline |
| Update to latest | git submodule update --remote lib/hve-core |
| Pin to specific commit | cd lib/hve-core && git checkout <sha> |
| Track different branch | git config submodule.lib/hve-core.branch develop |
After updating, commit the change:
git add lib/hve-core
git commit -m "Update HVE-Core submodule to latest"To update HVE-Core when rebuilding your devcontainer:
{
"updateContentCommand": "git submodule update --remote lib/hve-core || true"
}Submodules pin to a specific commit by default. To verify or change the pinned version:
Check current version:
cd lib/hve-core
git log -1 --onelinePin to a specific tag or commit:
cd lib/hve-core
git checkout v1.2.0 # or a specific commit SHA
cd ..
git add lib/hve-core
git commit -m "Pin HVE-Core to v1.2.0"After setup, verify HVE-Core is working:
- Check
lib/hve-core/contains the HVE-Core repository - Open Copilot Chat (
Ctrl+Alt+I) - Click the agent picker dropdown
- Verify HVE-Core agents appear (task-planner, task-researcher, etc.)
The submodule wasn't initialized:
git submodule update --init --recursive- Check settings paths: Verify
.vscode/settings.jsonpaths match submodule location - Reload window:
Ctrl+Shift+P→ "Developer: Reload Window" - Verify submodule content:
ls lib/hve-core/.github/agents/
This is normal for submodules. The submodule points to a specific commit, not a branch. To work on the submodule:
cd lib/hve-core
git checkout mainWhen multiple team members update the submodule:
git checkout --theirs lib/hve-core # Accept their version
# OR
git checkout --ours lib/hve-core # Keep your version
git add lib/hve-core
git commit| Aspect | Submodule | Multi-Root | Clone |
|---|---|---|---|
| Version controlled | ✅ Yes | ❌ No | |
| Team reproducibility | ✅ Same version | ||
| Update control | ✅ Explicit commits | ||
| In workspace | ✅ Subfolder | ✅ Workspace root | ❌ External |
| Initial setup | 🟡 Medium | 🟡 Medium | 🟢 Easy |
- Your First Workflow - Try HVE-Core with a real task
- RPI Workflow - Research, Plan, Implement methodology
- Back to Installation Guide - Compare other methods
🤖 Crafted with precision by ✨Copilot following brilliant human instruction, then carefully refined by our team of discerning human reviewers.
{ "chat.modeFilesLocations": { "lib/hve-core/.github/agents": true, ".github/agents": true }, "chat.promptFilesLocations": { "lib/hve-core/.github/prompts": true, ".github/prompts": true }, "chat.instructionsFilesLocations": { "lib/hve-core/.github/instructions": true, ".github/instructions": true } }