Git essentials for the web editor - Mintlify

Git lets you control and track changes to files. Git is the version control system of choice for docs-as-code workflows where you manage documentation 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 with your team.

What Git does for your docs

Git tracks every change made to your documentation. 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 documentation repository is the collection of files, and their history, that make up your documentation site. The web editor connects to this repository to read and update 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 you take in the web editor corresponds to a Git operation.

Your action in the editorGit operation behind the scenes
Open a fileFetch the latest version from your repository
Save changesCreate a commit, a snapshot of your changes in the project history
Create a branchCreate a branch, a separate line of work that doesn’t affect your live site unless you choose to publish it
Publish on your deployment branchPush your commit directly, which triggers a deployment
Publish on a feature branchCreate a pull request, a proposal to merge your changes into the deployment branch