2.1 KiB
2.1 KiB
Setting Up Explorer as Git Submodule
Current Status
The explorer monorepo has been created and initialized as a git repository. It's currently configured as a local submodule.
Converting to Remote Repository (Recommended)
To make the submodule work properly with remote repositories:
Step 1: Create Remote Repository
- Create a new repository on GitHub/GitLab/etc:
- Name:
chain-138-explorer - Description: "Blockchain explorer for ChainID 138"
- Name:
Step 2: Push Explorer to Remote
cd explorer-monorepo
# Add remote
git remote add origin https://github.com/yourusername/chain-138-explorer.git
# Push to remote
git push -u origin main
Step 3: Update Submodule Reference
In the parent project:
cd /home/intlc/projects/proxmox
# Update .gitmodules
cat > .gitmodules <<EOF
[submodule "explorer-monorepo"]
path = explorer-monorepo
url = https://github.com/yourusername/chain-138-explorer.git
EOF
# Update submodule reference
git submodule sync
git add .gitmodules
git commit -m "Update explorer submodule to use remote repository"
Using the Submodule
Clone Parent Project with Submodule
git clone <parent-repo-url>
cd proxmox
git submodule update --init --recursive
Update Submodule
# Update to latest
cd explorer-monorepo
git pull origin main
cd ..
git add explorer-monorepo
git commit -m "Update explorer submodule"
Work on Submodule
cd explorer-monorepo
# Make changes
git add .
git commit -m "Your changes"
git push origin main
cd ..
git add explorer-monorepo
git commit -m "Update submodule reference"
Local Development (Current Setup)
If keeping it as a local submodule:
- Work directly in
explorer-monorepo/ - Commit changes normally
- The parent project will track the submodule state
Benefits of Monorepo Structure
- Organization: Clear separation of concerns
- Versioning: Independent versioning of explorer
- Reusability: Can be used in other projects
- Deployment: Standalone deployment scripts
- Documentation: Self-contained documentation