Skip to main content
You don’t need to master Git before editing documentation. Start with five ideas: repository, branch, working copy, commit, and pull request.

Repository

A repository, usually shortened to “repo,” contains your documentation files and the history your team has committed. Mintlify builds your site from a configured branch in that repository. Teams often use main, but the deployment branch can have another name.

Branch and working copy

A branch is a line of work with its own version of the repository. A feature branch lets you prepare a change without updating the deployment branch. Your working copy is the repository on your computer. Edits in your working copy aren’t part of Git’s history yet. You can inspect them, preview them, and decide what belongs in the next commit. This distinction helps when Git reports a “modified” or “untracked” file: the file exists in your working copy, but you haven’t committed its current state.

Commit

A commit saves a selected set of changes to the branch’s history. Its message should say what the change accomplishes, such as Add authentication quickstart or Fix broken API reference link. Before committing, review the affected files with git status and the exact edits with git diff. Then stage only the files that belong together:
A commit is more useful when it represents one coherent change. It doesn’t need to capture every edit you made during a work session.

Pull request

A pull request, or PR, asks to merge one branch into another. It gives reviewers a focused diff and a place to discuss the change. For a repository connected to Mintlify, a PR can also receive a preview deployment. Your team may configure additional checks, such as broken-link or style checks. Approval requirements depend on the repository’s branch protection rules. Some teams require reviews; others allow the author to merge after checking the preview.

Merge

Merging applies the accepted changes to the target branch. When that target is your Mintlify deployment branch, the merge triggers a new deployment. After the work is merged, the feature branch can usually be deleted. Its commits remain in the repository’s history.

Commands in context

The everyday local workflow uses a small set of commands:
You don’t need to memorize the list. The workflow lesson will put the commands in order and explain when to use each one. Next up: Get connected — connect a documentation repository so Mintlify can deploy it.