Skip to content

Commit b761097

Browse files
Closes #13366: Update documentation for main branch (#18309)
* Closes #13366: Update documentation for main branch * Clarify wording
1 parent ab0a1f0 commit b761097

File tree

10 files changed

+58
-55
lines changed

10 files changed

+58
-55
lines changed

Diff for: .github/ISSUE_TEMPLATE/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
blank_issues_enabled: false
33
contact_links:
44
- name: 📖 Contributing Policy
5-
url: https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md
5+
url: https://github.com/netbox-community/netbox/blob/main/CONTRIBUTING.md
66
about: "Please read through our contributing policy before opening an issue or pull request."
77
- name: ❓ Discussion
88
url: https://github.com/netbox-community/netbox/discussions

Diff for: .github/workflows/close-stale-issues.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
issues may receive direct feedback. **Do not** attempt to circumvent this
3939
process by "bumping" the issue; doing so will result in its immediate closure
4040
and you may be barred from participating in any future discussions. Please see
41-
our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
41+
our [contributing guide](https://github.com/netbox-community/netbox/blob/main/CONTRIBUTING.md).
4242
4343
# Pull request parameters
4444
close-pr-message: >

Diff for: README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<div align="center">
2-
<img src="https://raw.githubusercontent.com/netbox-community/netbox/develop/docs/netbox_logo_light.svg" width="400" alt="NetBox logo" />
2+
<img src="https://raw.githubusercontent.com/netbox-community/netbox/main/docs/netbox_logo_light.svg" width="400" alt="NetBox logo" />
33
<p><strong>The cornerstone of every automated network</strong></p>
44
<a href="https://github.com/netbox-community/netbox/releases"><img src="https://img.shields.io/github/v/release/netbox-community/netbox" alt="Latest release" /></a>
5-
<a href="https://github.com/netbox-community/netbox/blob/master/LICENSE.txt"><img src="https://img.shields.io/badge/license-Apache_2.0-blue.svg" alt="License" /></a>
5+
<a href="https://github.com/netbox-community/netbox/blob/main/LICENSE.txt"><img src="https://img.shields.io/badge/license-Apache_2.0-blue.svg" alt="License" /></a>
66
<a href="https://github.com/netbox-community/netbox/graphs/contributors"><img src="https://img.shields.io/github/contributors/netbox-community/netbox?color=blue" alt="Contributors" /></a>
77
<a href="https://github.com/netbox-community/netbox/stargazers"><img src="https://img.shields.io/github/stars/netbox-community/netbox?style=flat" alt="GitHub stars" /></a>
88
<a href="https://explore.transifex.com/netbox-community/netbox/"><img src="https://img.shields.io/badge/languages-15-blue" alt="Languages supported" /></a>
9-
<a href="https://github.com/netbox-community/netbox/actions/workflows/ci.yml"><img src="https://github.com/netbox-community/netbox/workflows/CI/badge.svg?branch=master" alt="CI status" /></a>
9+
<a href="https://github.com/netbox-community/netbox/actions/workflows/ci.yml"><img src="https://github.com/netbox-community/netbox/workflows/CI/badge.svg?branch=main" alt="CI status" /></a>
1010
<p>
1111
<strong><a href="https://github.com/netbox-community/netbox/">NetBox Community</a></strong> |
1212
<strong><a href="https://netboxlabs.com/netbox-cloud/">NetBox Cloud</a></strong> |

Diff for: docs/development/getting-started.md

+4-8
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,12 @@ CHANGELOG.md CONTRIBUTING.md LICENSE.txt netbox README.md scri
3737

3838
### 2. Create a New Branch
3939

40-
The NetBox project utilizes three persistent git branches to track work:
40+
The NetBox project utilizes two persistent git branches to track work:
4141

42-
* `master` - Serves as a snapshot of the current stable release
43-
* `develop` - All development on the upcoming stable (patch) release occurs here
44-
* `feature` - Tracks work on an upcoming minor release
42+
* `main` - All development on the upcoming stable (patch) release occurs here. Releases are published from this branch.
43+
* `feature` - All work planned for the upcoming minor release is done here.
4544

46-
Typically, you'll base pull requests off of the `develop` branch, or off of `feature` if you're working on a new major release. For example, assume that the current NetBox release is v3.3.5. Work applied to the `develop` branch will appear in v3.3.6, and work done under the `feature` branch will be included in the next minor release (v3.4.0).
47-
48-
!!! warning
49-
**Never** merge pull requests into the `master` branch: This branch only ever merges pull requests from the `develop` branch, to effect a new release.
45+
Typically, you'll base pull requests off of the `main` branch, or off of `feature` if you're working on the upcoming minor or major release. For example, assume that the current NetBox release is v4.2.3. Work applied to the `main` branch will appear in v4.2.4, and work done under the `feature` branch will be included in the next minor release (v4.3.0).
5046

5147
To create a new branch, first ensure that you've checked out the desired base branch, then run:
5248

Diff for: docs/development/git-cheat-sheet.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Fast-forward
128128
```
129129

130130
!!! warning "Avoid Merging Remote Branches"
131-
You generally want to avoid merging branches that exist on the remote (upstream) repository, such as `develop` and `feature`: Merges into these branches should be done via a pull request on GitHub. Only merge branches when it is necessary to consolidate work you've done locally.
131+
You generally want to avoid merging branches that exist on the remote (upstream) repository, namely `main` and `feature`: Merges into these branches should be done via a pull request on GitHub. Only merge branches when it is necessary to consolidate work you've done locally.
132132

133133
### Show Pending Changes
134134

@@ -196,7 +196,7 @@ index 93e125079..4344fb514 100644
196196
+and here too
197197
+
198198
<div align="center">
199-
<img src="https://raw.githubusercontent.com/netbox-community/netbox/develop/docs/netbox_logo.svg" width="400" alt="NetBox logo" />
199+
<img src="https://raw.githubusercontent.com/netbox-community/netbox/main/docs/netbox_logo.svg" width="400" alt="NetBox logo" />
200200
</div>
201201
diff --git a/foo.py b/foo.py
202202
new file mode 100644

Diff for: docs/development/index.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ NetBox and many of its related projects are maintained on [GitHub](https://githu
88

99
![GitHub](../media/development/github.png)
1010

11-
There are three permanent branches in the repository:
11+
There are two permanent branches in the repository:
1212

13-
* `master` - The current stable release. Individual changes should never be pushed directly to this branch, but rather merged from `develop`.
14-
* `develop` - Active development for the upcoming patch release. Pull requests will typically be based on this branch unless they introduce breaking changes that must be deferred until the next minor release.
15-
* `feature` - New feature work to be introduced in the next minor release (e.g. from v3.3 to v3.4).
13+
* `main` - Active development for the upcoming patch release. Pull requests will typically be based on this branch unless they introduce breaking changes that must be deferred until the next minor release.
14+
* `feature` - New feature work to be introduced in the next minor release (e.g. from v4.2 to v4.3).
1615

1716
NetBox components are arranged into Django apps. Each app holds the models, views, and other resources relevant to a particular function:
1817

@@ -57,4 +56,4 @@ NetBox follows the [benevolent dictator](http://oss-watch.ac.uk/resources/benevo
5756

5857
## Licensing
5958

60-
The entire NetBox project is licensed as open source under the [Apache 2.0 license](https://github.com/netbox-community/netbox/blob/master/LICENSE.txt). This is a very permissive license which allows unlimited redistribution of all code within the project. Note that all submissions to the project are subject to the same license.
59+
The entire NetBox project is licensed as open source under the [Apache 2.0 license](https://github.com/netbox-community/netbox/blob/main/LICENSE.txt). This is a very permissive license which allows unlimited redistribution of all code within the project. Note that all submissions to the project are subject to the same license.

Diff for: docs/development/release-checklist.md

+18-9
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ Follow these instructions to perform a new installation of NetBox in a temporary
4343

4444
Upgrading from a previous version typically involves database migrations, which must work without errors. Supported upgrade paths include from one minor version to another within the same major version (i.e. 4.0 to 4.1), as well as from the latest patch version of the previous minor version (i.e. 3.7 to 4.0 or to 4.1). Prior to release, test all these supported paths by loading demo data from the source version and performing a `./manage.py migrate`.
4545

46-
### Merge the Release Branch
46+
### Merge the `feature` Branch
4747

48-
Submit a pull request to merge the `feature` branch into the `develop` branch in preparation for its release. Once it has been merged, continue with the section for patch releases below.
48+
Submit a pull request to merge the `feature` branch into the `main` branch in preparation for its release. Once it has been merged, continue with the section for patch releases below.
4949

5050
### Rebuild Demo Data (After Release)
5151

@@ -55,6 +55,15 @@ After the release of a new minor version, generate a new demo data snapshot comp
5555

5656
## Patch Releases
5757

58+
### Create a Release Branch
59+
60+
Begin by creating a new branch (based off of `main`) to effect the release. This will comprise the changes listed below.
61+
62+
```
63+
git checkout main
64+
git checkout -B release-vX.Y.Z
65+
```
66+
5867
### Notify netbox-docker Project of Any Relevant Changes
5968

6069
Notify the [`netbox-docker`](https://github.com/netbox-community/netbox-docker) maintainers (in **#netbox-docker**) of any changes that may be relevant to their build process, including:
@@ -111,25 +120,25 @@ Then, compile these portable (`.po`) files for use in the application:
111120
* Update the example version numbers in the feature request and bug report templates under `.github/ISSUE_TEMPLATES/`.
112121
* Replace the "FUTURE" placeholder in the release notes with the current date.
113122

114-
Commit these changes to the `develop` branch and push upstream.
123+
Commit these changes to the `main` branch and push upstream.
115124

116125
### Verify CI Build Status
117126

118-
Ensure that continuous integration testing on the `develop` branch is completing successfully. If it fails, take action to correct the failure before proceeding with the release.
127+
Ensure that continuous integration testing on the `main` branch is completing successfully. If it fails, take action to correct the failure before proceeding with the release.
119128

120129
### Submit a Pull Request
121130

122-
Submit a pull request titled **"Release vX.Y.Z"** to merge the `develop` branch into `master`. Copy the documented release notes into the pull request's body.
131+
Submit a pull request titled **"Release vX.Y.Z"** to merge the current release branch (e.g. `release-vX.Y.Z`) into `main`. Copy the documented release notes into the pull request's body.
123132

124-
Once CI has completed on the PR, merge it. This effects a new release in the `master` branch.
133+
Once CI has completed and a colleague has reviewed the PR, merge it. This effects a new release in the `main` branch.
125134

126135
### Create a New Release
127136

128137
Create a [new release](https://github.com/netbox-community/netbox/releases/new) on GitHub with the following parameters.
129138

130-
* **Tag:** Current version (e.g. `v3.3.1`)
131-
* **Target:** `master`
132-
* **Title:** Version and date (e.g. `v3.3.1 - 2022-08-25`)
139+
* **Tag:** Current version (e.g. `v4.2.1`)
140+
* **Target:** `main`
141+
* **Title:** Version and date (e.g. `v4.2.1 - 2025-01-17`)
133142
* **Description:** Copy from the pull request body, then promote the `###` headers to `##` ones
134143

135144
Once created, the release will become available for users to install.

Diff for: docs/development/translations.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ To update the English `.po` file from which all translations are derived, use th
1414
./manage.py makemessages -l en -i "project-static/*"
1515
```
1616

17-
Then, commit the change and push to the `develop` branch on GitHub. Any new strings will appear for translation on Transifex automatically.
17+
Then, commit the change and push to the `main` branch on GitHub. Any new strings will appear for translation on Transifex automatically.
1818

1919
!!! note
20-
It is typically not necessary to update source strings manually, as this is done nightly by a [GitHub action](https://github.com/netbox-community/netbox/blob/develop/.github/workflows/update-translation-strings.yml).
20+
It is typically not necessary to update source strings manually, as this is done nightly by a [GitHub action](https://github.com/netbox-community/netbox/blob/main/.github/workflows/update-translation-strings.yml).
2121

2222
## Updating Translated Strings
2323

Diff for: docs/installation/3-netbox.md

+11-9
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ python3 -V
2929

3030
## Download NetBox
3131

32-
This documentation provides two options for installing NetBox: from a downloadable archive, or from the git repository. Installing from a package (option A below) requires manually fetching and extracting the archive for every future update, whereas installation via git (option B) allows for seamless upgrades by re-pulling the `master` branch.
32+
This documentation provides two options for installing NetBox: from a downloadable archive, or from the git repository. Installing from a package (option A below) requires manually fetching and extracting the archive for every future update, whereas installation via git (option B) allows for seamless upgrades by checking out the latest release tag.
3333

3434
### Option A: Download a Release Archive
3535

@@ -67,16 +67,13 @@ If `git` is not already installed, install it:
6767
sudo yum install -y git
6868
```
6969

70-
Next, clone the **master** branch of the NetBox GitHub repository into the current directory. (This branch always holds the current stable release.)
70+
Next, clone the git repository:
7171

7272
```no-highlight
73-
sudo git clone -b master --depth 1 https://github.com/netbox-community/netbox.git .
73+
sudo git clone https://github.com/netbox-community/netbox.git .
7474
```
7575

76-
!!! note
77-
The `git clone` command above utilizes a "shallow clone" to retrieve only the most recent commit. If you need to download the entire history, omit the `--depth 1` argument.
78-
79-
The `git clone` command should generate output similar to the following:
76+
This command should generate output similar to the following:
8077

8178
```
8279
Cloning into '.'...
@@ -88,8 +85,13 @@ Receiving objects: 100% (996/996), 4.26 MiB | 9.81 MiB/s, done.
8885
Resolving deltas: 100% (148/148), done.
8986
```
9087

91-
!!! note
92-
Installation via git also allows you to easily try out different versions of NetBox. To check out a [specific NetBox release](https://github.com/netbox-community/netbox/releases), use the `git checkout` command with the desired release tag. For example, `git checkout v3.0.8`.
88+
Finally, check out the tag for the desired release. You can find these on our [releases page](https://github.com/netbox-community/netbox/releases). Replace `vX.Y.Z` with your selected release tag below.
89+
90+
```
91+
sudo git checkout vX.Y.Z
92+
```
93+
94+
Using this installation method enables easy upgrades in the future by simply checking out the latest release tag.
9395

9496
## Create the NetBox System User
9597

Diff for: docs/installation/upgrading.md

+12-15
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,18 @@ NetBox requires the following dependencies:
2525

2626
## 3. Install the Latest Release
2727

28-
As with the initial installation, you can upgrade NetBox by either downloading the latest release package or by cloning the `master` branch of the git repository.
28+
As with the initial installation, you can upgrade NetBox by either downloading the latest release package or by checking out the latest production release from the git repository.
2929

3030
!!! warning
31-
Use the same method as you used to install NetBox originally
31+
Use the same method as you used to install NetBox originally.
3232

3333
If you are not sure how NetBox was installed originally, check with this command:
3434

3535
```
3636
ls -ld /opt/netbox /opt/netbox/.git
3737
```
3838

39-
If NetBox was installed from a release package, then `/opt/netbox` will be a
40-
symlink pointing to the current version, and `/opt/netbox/.git` will not
41-
exist. If it was installed from git, then `/opt/netbox` and
42-
`/opt/netbox/.git` will both exist as normal directories.
39+
If NetBox was installed from a release package, then `/opt/netbox` will be a symlink pointing to the current version, and `/opt/netbox/.git` will not exist. If it was installed from git, then `/opt/netbox` and `/opt/netbox/.git` will both exist as normal directories.
4340

4441
### Option A: Download a Release
4542

@@ -84,20 +81,20 @@ If you followed the original installation guide to set up gunicorn, be sure to c
8481
sudo cp /opt/netbox-$OLDVER/gunicorn.py /opt/netbox/
8582
```
8683

87-
### Option B: Clone the Git Repository
84+
### Option B: Check Out a Git Release
8885

89-
This guide assumes that NetBox is installed at `/opt/netbox`. Pull down the most recent iteration of the master branch:
86+
This guide assumes that NetBox is installed at `/opt/netbox`. First, determine the latest release either by visiting our [releases page](https://github.com/netbox-community/netbox/releases) or by running the following `git` commands:
9087

91-
```no-highlight
92-
cd /opt/netbox
93-
sudo git checkout master
94-
sudo git pull origin master
88+
```
89+
sudo git fetch --tags
90+
git describe --tags $(git rev-list --tags --max-count=1)
9591
```
9692

97-
!!! info "Checking out an older release"
98-
If you need to upgrade to an older version rather than the current stable release, you can check out any valid [git tag](https://github.com/netbox-community/netbox/tags), each of which represents a release. For example, to checkout the code for NetBox v2.11.11, do:
93+
Check out the desired release by specifying its tag:
9994

100-
sudo git checkout v2.11.11
95+
```
96+
sudo git checkout v4.2.0
97+
```
10198

10299
## 4. Run the Upgrade Script
103100

0 commit comments

Comments
 (0)