Replace master branch with a release branch #8412

Closed
opened 2025-12-29 20:36:22 +01:00 by adam · 4 comments
Owner

Originally created by @jeremystretch on GitHub (Aug 3, 2023).

Originally assigned to: @jeremystretch on GitHub.

Proposed Changes

We currently maintain three persistent branches within the project:

  • master - Contains the latest stable release
  • develop - Any work intended for the next patch release
  • feature - Feature work & breaking changes intended for the next minor release (e.g. v3.6)

The master branch is essentially a clone of develop, which gets merged every time a new release is to be published. We can remove this branch and create a new release branch which contains only a single squashed commit for each release.

Justification

Our current approach can be confusing as many newcomers expect master to function as the repo's default branch (ours is develop). And introducing a new release branch which is limited to only squashed commits provides a much more efficient mechanism for checking out the latest stable release using git (e.g. git checkout release).

Originally created by @jeremystretch on GitHub (Aug 3, 2023). Originally assigned to: @jeremystretch on GitHub. ### Proposed Changes We currently maintain three persistent branches within the project: - `master` - Contains the latest stable release - `develop` - Any work intended for the next patch release - `feature` - Feature work & breaking changes intended for the next minor release (e.g. v3.6) The `master` branch is essentially a clone of `develop`, which gets merged every time a new release is to be published. We can remove this branch and create a new `release` branch which contains only a single squashed commit for each release. ### Justification Our current approach can be confusing as many newcomers expect `master` to function as the repo's default branch (ours is `develop`). And introducing a new `release` branch which is limited to only squashed commits provides a much more efficient mechanism for checking out the latest stable release using git (e.g. `git checkout release`).
adam added the status: acceptedtype: housekeepingnetbox labels 2025-12-29 20:36:22 +01:00
adam closed this issue 2025-12-29 20:36:23 +01:00
Author
Owner

@pv2b commented on GitHub (Aug 18, 2023):

For my two cents: Removing or renaming the "master" branch makes sense. The "master" branch not being the one being actively developed was confusing for me as a newcomer as well.

That said, I'm not sure how much value there is to squashing the commits on the "release" branch. Is the efficiency really worth not being able to "git blame" if you have the release branch checked out? Personally, I'd say no, I'd much rather have git blame work if I'm checked out with the release branch rather than have my checkout take half a second instead of three.

@pv2b commented on GitHub (Aug 18, 2023): For my two cents: Removing or renaming the "master" branch makes sense. The "master" branch not being the one being actively developed was confusing for me as a newcomer as well. That said, I'm not sure how much value there is to squashing the commits on the "release" branch. Is the efficiency really worth not being able to "git blame" if you have the release branch checked out? Personally, I'd say no, I'd much rather have git blame work if I'm checked out with the release branch rather than have my checkout take half a second instead of three.
Author
Owner

@github-actions[bot] commented on GitHub (Feb 3, 2024):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Feb 3, 2024): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Aug 2, 2024):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Aug 2, 2024): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@jeremystretch commented on GitHub (Jan 6, 2025):

We've opted to designate the new default branch as main per convention.

@jeremystretch commented on GitHub (Jan 6, 2025): We've opted to designate the new default branch as `main` per convention.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8412