GitOps for network teams: managing configuration changes through Git and pull requests
In short: GitOps applies software practices to network changes. Intended configuration or variables live in a Git repository. Engineers propose changes in branches and pull requests, colleagues review them, a pipeline lints and tests them, and merging triggers automated deployment and verification. Git provides a complete history and simple rollback by reverting a commit.
The idea
In many teams, changes are typed into devices, recorded loosely in a ticket and backed up afterwards. With GitOps, the Git repository holds the intended state. Devices are updated from the repository, never by hand, so the repository and network stay aligned.
What goes in the repository
- Variables per site and device (YAML), or data exported from a source of truth.
- Templates (Jinja2) that turn variables into configuration.
- Playbooks or scripts that deploy and verify.
- Tests and pipeline definitions.
- Never passwords or keys in plain text; use a secrets manager or encrypted values.
The workflow
- Create a branch:
git switch -c add-vlan-120-branch-15. - Edit variables, commit with a clear message, push and open a pull request.
- The pipeline runs: YAML lint, template rendering, configuration diff against current state, policy checks (for example no "permit any any"), and lab or dry-run tests.
- A colleague reviews the diff and pipeline results, and approves.
- Merge, usually in a change window; the pipeline deploys and runs post-change checks.
Drift and rollback
- Drift detection: scheduled jobs compare running configuration with intended configuration and report differences caused by manual changes.
- Rollback: revert the commit and let the pipeline deploy the previous state.
Starting gradually
- Begin by storing configuration backups in Git to get history and diffs.
- Next, manage one area (for example VLANs or ACLs) through templates and pull requests.
- Add pipeline checks, then automated deployment.
- Train the team in Git basics; keep the process simple.
- Agree a break-glass process for emergencies, followed by updating the repository.
Real-world example: the review that saved a branch
An engineer opened a pull request to update an ACL on 40 branch routers. The pipeline's rendered diff showed the new ACL would remove a line allowing the payment terminals' traffic, because a variable name had a typo. The reviewer spotted it immediately in the diff. Previously, the change would have been pasted into each router during the night.
Practice
In GitOps, where does the intended network state live?
How do you roll back a change in a GitOps workflow?
What is drift detection?
Key takeaways
- GitOps keeps intended network state in Git.
- Changes go through branches, pull requests, reviews and pipelines.
- Merging triggers deployment and verification; reverting rolls back.
- Detect drift and adopt the approach in small steps.
Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.