# NetBox: How to Prevent Direct Changes to the Main Branch

DevFeed: [NetBox: How to Prevent Direct Changes to the Main Branch](<https://devfeed.tech/articles/netbox-how-to-prevent-direct-changes-to-the-main-branch-30859.md>)

Original publisher: [Read original article](<https://www.packetcoders.io/netbox-how-to-prevent-direct-changes-to-main/>)

Author: Rick Donato

Published: 2026-07-17T12:51:04Z

Content type: tutorial

Language: en

Sources: [Packet Coders - Learn Network Automation](<https://devfeed.tech/sources/packet-coders-learn-network-automation.md>)

Topics: [NetBox](<https://devfeed.tech/topics/netbox.md>), [configuration](<https://devfeed.tech/topics/configuration.md>)

Tags: [configuration](<https://devfeed.tech/tags/configuration.md>), [example](<https://devfeed.tech/tags/example.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [netbox](<https://devfeed.tech/tags/netbox.md>), [plugin](<https://devfeed.tech/tags/plugin.md>), [tips](<https://devfeed.tech/tags/tips.md>)

## AI overview

This tutorial explains how to use the NetBox Changes plugin to prevent direct changes to the main branch. It describes enabling protect_main so changes use branches and an approval workflow, and provides a configuration example.

## Source excerpt

NetBox Tip! Prevent direct changes to the main branch when using the NetBox Changes plugin. Enable protect_main to ensure all changes are made through branches and follow an approval workflow. Here's an example configuration: # ./configuration.py PLUGINS_CONFIG = { "netbox_changes": { "protect_main": True,