Home › Curriculum › Technical Foundations › Git and branching for Odoo
Linux, Git and Docker · 14 min · Git 2.x + Odoo.shGit and branching for Odoo
Repositories, commits, branches, pull requests and how Odoo.sh turns branches into development, staging and production builds.
In this lesson
- The daily loop and commit conventions
- Repository layout and what never to commit
- Odoo.sh branches and stages
Key points
- Version-prefixed branches; [ADD]/[FIX]/[IMP]/[MIG] commit tags
- One folder per module; submodules for third-party addons
- Never commit passwords or API keys
- Odoo.sh: development → staging → production by merging
Real-world example
A hot fix was made directly in production with Odoo.sh's online editor and lost at the next deploy. The team moved to 'every change through a branch and PR', with staging tests on a copy of production. The same class of bug never came back.
Questions and answers
How do you include an OCA module in your repo?
As a Git submodule (or pinned in requirements), not by copying files.
Why prefix branches with the Odoo version?
Modules are version-specific; it prevents merging 19.0 code into 20.0.