You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/development/Development.md
+103-6Lines changed: 103 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,11 +107,13 @@ The main flow for a contributing is as follows:
107
107
7.`git add <files that have changed>`
108
108
8.`git commit`
109
109
9.`git push origin my-new-code`
110
-
10. Create pull request using github UI to merge your changes from your new branch into `inav/master`
110
+
10. Create pull request using github UI to merge your changes from your new branch into the appropriate target branch (see "Branching and release workflow" below)
111
111
11. Repeat from step 4 for new other changes.
112
112
113
113
The primary thing to remember is that separate pull requests should be created for separate branches. Never create a pull request from your `master` branch.
114
114
115
+
**Important:** Most contributions should target a maintenance branch, not `master`. See the branching section below for guidance on choosing the correct target branch.
116
+
115
117
Later, you can get the changes from the INAV repo into your `master` branch by adding INAV as a git remote and merging from it as follows:
@@ -125,10 +127,105 @@ You can also perform the git commands using the git client inside Eclipse. Refe
125
127
126
128
## Branching and release workflow
127
129
128
-
Normally, all development occurs on the `master` branch. Every release will have it's own branch named `release_x.y.z`.
130
+
INAV uses maintenance branches for active development and releases. The `master` branch receives merges from maintenance branches.
131
+
132
+
### Branch Types
133
+
134
+
#### Maintenance Branches (Current and Next Major Version)
135
+
136
+
**Current version branch** (e.g., `maintenance-9.x`):
137
+
- Used for backward-compatible changes
138
+
- Bug fixes, new features, and improvements that don't break compatibility
139
+
- Changes here will be included in the next release of the current major version (e.g., 9.1, 9.2)
140
+
- Does not create compatibility issues between firmware and configurator within the same major version
141
+
142
+
**Next major version branch** (e.g., `maintenance-10.x`):
143
+
- Used for changes that introduce compatibility requirements
144
+
- Breaking changes that would cause issues between different major versions
145
+
- New features that require coordinated firmware and configurator updates
146
+
- Changes here will be included in the next major version release (e.g., 10.0)
147
+
148
+
#### Master Branch
149
+
150
+
The `master` branch receives periodic merges from maintenance branches.
151
+
152
+
### Choosing the Right Target Branch
153
+
154
+
When creating a pull request, target the appropriate branch:
155
+
156
+
**Target the current version branch** (e.g., `maintenance-9.x`) if your change:
157
+
- Fixes a bug
158
+
- Adds a new feature that is backward-compatible
159
+
- Updates documentation
160
+
- Adds or updates hardware targets
161
+
- Makes improvements that work with existing releases
162
+
163
+
**Target the next major version branch** (e.g., `maintenance-10.x`) if your change:
164
+
- Breaks compatibility with the current major version
165
+
- Requires coordinated firmware and configurator updates
166
+
- Changes MSP protocol in an incompatible way
167
+
- Modifies data structures in a breaking way
168
+
169
+
### Release Workflow
170
+
171
+
1. Development occurs on the current version maintenance branch (e.g., `maintenance-9.x`)
172
+
2. When ready for release, a release candidate is tagged from the maintenance branch
173
+
3. Bug fixes during the RC period continue on the maintenance branch
174
+
4. After final release, the maintenance branch is periodically merged into `master`
175
+
5. The cycle continues with the maintenance branch receiving new changes for the next release
176
+
177
+
### Propagating Changes Between Maintenance Branches
178
+
179
+
Changes committed to the current version branch should be merged forward to the next major version branch to prevent regressions.
129
180
130
-
During release candidate cycle we will follow the process outlined below:
181
+
**Maintainer workflow:**
182
+
- Changes merged to `maintenance-9.x` should be regularly merged into `maintenance-10.x`
183
+
- This ensures fixes and features aren't lost when the next major version is released
184
+
- Prevents users from experiencing bugs in v10.0 that were already fixed in v9.x
131
185
132
-
1. Create a release branch `release_x.y.z`
133
-
2. All bug fixes found in the release candidates will be merged into `release_x.y.z` branch and not into the `master`.
134
-
3. After final release is made, the branch `release_x.y.z` is locked, and merged into `master` bringing all of the bug fixes into the development branch. Merge conflicts that may arise at this stage are resolved manually.
186
+
**Example:**
187
+
```bash
188
+
# Merge changes from current to next major version
189
+
git checkout maintenance-10.x
190
+
git merge maintenance-9.x
191
+
git push upstream maintenance-10.x
192
+
```
193
+
194
+
### Example Timeline
195
+
196
+
Current state (example):
197
+
-`maintenance-9.x` - Active development for INAV 9.1, 9.2, etc.
198
+
-`maintenance-10.x` - Breaking changes for future INAV 10.0
199
+
-`master` - Receives periodic merges from maintenance branches
200
+
201
+
After INAV 10.0 is released:
202
+
-`maintenance-10.x` - Active development for INAV 10.1, 10.2, etc.
203
+
-`maintenance-11.x` - Breaking changes for future INAV 11.0
204
+
-`master` - Continues receiving merges
205
+
206
+
### Working with Maintenance Branches
207
+
208
+
To branch from the current maintenance branch instead of master:
209
+
210
+
```bash
211
+
# Fetch latest changes
212
+
git fetch upstream
213
+
214
+
# Create your feature branch from the maintenance branch
0 commit comments