Git essentials for the editor
Understand the Git version control concepts behind the Mintlify editor, including branches, commits, pull requests, and merge workflows.
Git lets you control and track changes to files. It’s the version control system behind branch-based workflows, where you manage content the same way you would any other codebase.
The web editor handles Git operations for you. Understanding a few key concepts helps you get the most out of the editor and collaborate effectively with your team.
What Git does for your content
Git tracks every change made to your content. It records what changed, who changed it, when they changed it, and why. This means you can:
- See the full history of any page.
- Undo changes by reverting to a previous version.
- Work on updates without affecting your live site.
- Review changes before they go live.
Your repository is the collection of files and their history that makes up your site. The editor connects to this repository to sync and publish your content.
Key concepts
These are the Git concepts you’ll encounter most often when using the web editor.
How the editor maps to Git
Every action in the web editor corresponds to a Git operation. Here is the full reference:
| Action in the editor | Git operation |
|---|---|
| Edit a page | Changes auto-save to Mintlify servers. No Git commit yet. |
| Publish on your deployment branch | git commit and git push. Triggers a deployment. |
| Save in branch | git commit to the current feature branch. |
| Create pull request | git push and opens a pull request against your deployment branch. |
| Merge and publish | Merges the pull request and triggers a deployment. |
| Create a branch | git checkout -b <branch-name> |
| Switch branches | git checkout <branch-name> |
| External push or CLI update | Incoming changes sync into the editor automatically using a three-way merge. |