Skip to content

Git Repository Architecture: Team Collaboration Git Setup

Git Repository Architecture: Team Collaboration Git Setup

With team roles defined, the next step is to establish an efficient Git collaboration infrastructure. This section focuses on Git configurations directly related to team organization — how to design submodule architecture, branch strategies, permission models, and conventions that allow marketing, engineering, and finance to collaborate within a single version control system.

IoT projects involve multiple asset types, each with distinct access permissions and update cadences:

Asset TypeContentsMaintained byAccess
Firmware sourceC/C++ code, CMakeListsFirmware engineersEngineering R/W
Hardware designKiCAD projects, GerberHardware engineersEngineering R/W
Test scriptsPython scripts, test firmwareTest/Firmware engineersEngineering R/W
RequirementsCustomer needs, functional specsPre-sales engineersSales+Mgmt R/W
Business docsContracts, quotes, communicationPre-sales engineersSales/Mgmt only
Project decisionsApproval reviews, financial assessmentCommitteeAll read, Mgmt write

Using Git submodules, you can organize different assets under one main repository while maintaining independent access control.

iot-project/ # Main repo (index & docs only)
├── .gitmodules # Submodule declarations
├── README.md # Project overview, status, contacts
├── docs/ # Project-level documentation
│ └── project-overview.md
├── firmware/ # Submodule: firmware
│ └── (independent git repo)
├── hardware/ # Submodule: hardware
│ └── (independent git repo)
├── test/ # Submodule: automated testing
│ └── (independent git repo)
└── business/ # Submodule: business docs (private)
└── (independent git repo)
Terminal window
mkdir iot-project && cd iot-project
git init
mkdir docs
echo "# IoT Project" > README.md
git add README.md docs/
git commit -m "chore: initialize project main repo"
Terminal window
# Technical submodules (team-visible)
git submodule add https://github.com/your-org/iot-firmware.git firmware
git submodule add https://github.com/your-org/iot-hardware.git hardware
git submodule add https://github.com/your-org/iot-test.git test
# Business submodule (private, sales+management only)
git submodule add https://github.com/your-org/iot-business.git business
git add .gitmodules
git commit -m "chore: add all submodules"

All repositories (main + submodules) should enforce:

  • main branch: direct push prohibited, PR required
  • PR requirement: at least 1 Code Review approval
  • Status check: CI automated tests must pass
RolePrimary SubmoduleCollaboration Method
Firmware engineerfirmware/feature branch → PR → Code Review
Hardware engineerhardware/feature branch → PR → Code Review
Pre-sales engineerbusiness/Direct commit or simple PR
Test engineertest/feature branch → PR → Code Review
Committee memberMain repo READMEView status, no code writes
1. Committee approves project → update README in main repo
2. Tech lead creates feature branch from main in firmware/hardware
3. Development complete → PR within submodule → Code Review
4. Merge into submodule main → CI triggers integration tests
5. Update submodule reference pointer in main repo
Terminal window
# Step 2: Tech lead creates a feature branch
cd firmware
git checkout -b feature/mqtt-reconnect
# Step 3: Create PR on GitHub/GitLab after development
# Step 4: After merge, update main repo reference
cd ..
git add firmware
git commit -m "chore: update firmware submodule to mqtt-reconnect feature"

Pre-sales work primarily in the business/ submodule:

Terminal window
# Clone (first time)
git clone --recursive https://github.com/your-org/iot-project.git
# Daily: just work in business submodule
cd iot-project/business
git status
git add requirements/v2-customer-needs.md
git commit -m "docs: add customer phase 2 requirements"
git push origin main

Pre-sales colleagues don’t need to enter firmware/ or hardware/. The main repo’s README.md provides project status visibility for marketing and management.

Committee Decision ↔ Git Operations Mapping

Section titled “Committee Decision ↔ Git Operations Mapping”
PhaseGit OperationSubmodule
Pre-sales collects requirementsWrite requirement docs in business/business/
Technical assessmentBOM & cycle estimate in firmware/, hardware/firmware/, hardware/
Financial assessmentFinance opinion document → business/business/
Committee reviewUpdate project approval status in main READMEMain repo
Project approvedCreate feature/ branch from submodule mainTech submodules
ItemRecommended Practice
Branch namingfeature/name, fix/description, docs/name
Commit messagesConventional Commits (feat:, fix:, docs:, chore:)
MergingTech submodules: PR + Code Review; Business: simplified
Main branch protectionTech submodules: no direct push
Submodule pointersUpdate main repo commit after submodule merge
.gitignoreEach submodule manages its own
Cross-role visibilityMain repo README updated regularly for marketing & finance

Next: With the Git repository architecture established, the next section covers how pre-sales engineers use the business/ submodule to collect customer requirements and write formal requirement documents.


Building a commercial IoT product?

We provide ESP32 ODM design-to-manufacturing services. From prototype to production — the team behind this tutorial can build it with you.

Talk to us →