Make the pull request easy to review
A useful pull request tells reviewers:- What changed
- Why it changed
- Which pages or flows deserve close attention
- What is deliberately outside the scope
Review in the web editor
Not everyone on your team needs to use GitHub. In the web editor, teammates can:- Comment on specific text or a whole page. Every role can comment, including viewers.
- Suggest changes that an editor or admin accepts or rejects. Viewers are always in suggesting mode.
- Edit together on the same branch in real time, in visual or source mode. Changes merge automatically as you type, with no conflicts to resolve.
Coordinate before branches overlap
Two branches can change the same files without causing a conflict. A conflict occurs only when Git can’t combine overlapping edits automatically. Still, Git resolving the files doesn’t guarantee that the combined writing makes sense. Two writers can add contradictory explanations in different paragraphs and produce a clean merge. Tell teammates when you’re changing a shared page or navigation group, and review the combined result after syncing. Keep branches focused and start them from a current deployment branch. For longer work, agree on checkpoints where you’ll bring in the latest changes, rather than doing it on an arbitrary schedule. If someone pushes to the repository while you have a page open in the web editor, the editor merges their changes into your page and tells you. When both of you changed the same part of the page, it keeps both versions and highlights them so you can choose.Resolve a merge conflict locally
Before bringingmain into your feature branch, confirm where you are and that your own work is committed or safely set aside:
main if your site uses another deployment branch.
If Git finds a conflict, it marks the affected section:
Use branch protection as a team rule
Branch protection can require pull requests, approvals, or passing checks before changes reach the deployment branch. Configure the rules around the risks your team wants to manage. Mintlify follows those rules. When the deployment branch is protected, the web editor won’t publish to it directly. It offers Create branch instead, so every change goes through a pull request. If your repository requires pull requests, use the same path for urgent fixes but keep the review focused and quick. If it permits direct publishing, decide as a team which changes still deserve a branch and preview.Protect work before trying to undo it
Start withgit status and git diff. These commands inspect the working copy without changing it.
If you need to switch tasks, commit a sensible checkpoint or stash the work temporarily:
git stash pop. Review the result because applying a stash can also produce conflicts.
git restore path/to/file.mdx discards uncommitted changes to that file. Use it only when you have inspected the diff and are certain those edits are unwanted. It isn’t a recovery command.
If a mistake is already in shared history, prefer a new commit that corrects or reverts it. Avoid rewriting a branch other people may be using unless your team has agreed to it.
That’s the end of the Git and GitHub for Mintlify course. You can now connect the repository, make a focused change, review the rendered result, and recover when work overlaps. Next, Structure docs that scale covers how to organize that content as the documentation grows.