Why branched content?
Branches are used heavily in software development, giving contributors ways to keep main code branches protected, with abstracted branches used for proposing or implementing specific changes. GitBook brings this approach to content and documentation — allowing for content to be branched as many times as required, protecting the main branch of content from changes, giving a clear version history, and allowing for review-focused dynamics around what changes make their way into the main branch of content and why they’re being proposed.Working with change requests
Open a change request
When a space is locked for live editing, the main branch of content is read-only. To start editing, create a change request by:
- Pressing the Edit button in the top right corner when viewing a space
- Implementing a new change request with GitBook Agent
- Automatically by GitBook Agent
Make your changes
After a change request is opened, you’re free to make any edits or changes. Your changes are synced automatically, and you can collaborate with real-time collaboration.Changes can be made by working directly in the editor or by working with Docs Agent.
Request a review
Once your changes are ready, request a review from your team in the Overview tab. Tagging reviewers will notify them and allow you to collaborate further by making more changes in the editor or discussing changes in comments.You can request reviews from Docs Agent or anyone on your team with the right permissions.
While in a change request, your experience is familiar — your changes sync automatically, you can collaborate in real-time, and you have the same editor experience. The main difference is that this is a branch of the main content.
Creating a change request
Inside a space where live edits are disabled, click the Edit button in the space header to start a new change request. This will open a new change request where you can edit or delete content as needed. Your changes are saved automatically, and other people can join you to collaborate in real-time. When creating a change request, you can add a title and description to provide more context about the changes you’re making.Creating with GitBook Agent
GitBook Agent is an AI teammate that can plan and implement change requests based on any instructions you give it. To open a new change request with GitBook Agent, click the GitBook Agent icon in the upper right corner next to the Edit button, and ask GitBook to implement any changes you want. Some things you can ask it to do include:- Add usage examples
- Improve page SEO
- Enhance clarity
- Check for consistency
- Fix typos and spelling errors
- Link related content
Previewing a change request
You can preview the changes you’ve made by clicking the Preview option in the space header. This will switch to a preview of your published docs with the proposed changes included. Below the Preview button is a URL for your site preview. Click this and your site preview will open in full in a new tab with the Preview toolbar at the bottom.You can only preview change requests for spaces added to a published docs site.
Reviewing a change request
It’s up to you and your team how you want to handle reviews — GitBook is not opinionated or forceful in this regard. Some teams have a very loose review process, others have strict procedures using advanced permission roles. Most reviews will take place in the change request’s comments, where collaborators can share feedback and discussions against specific content blocks or against the change request as a whole.Diff view
You can toggle diff mode on or off for any change request. This gives you an in-context comparison of the primary content and the changes made in the change request. When you open the Changes tab in the space header, the diff view will appear. It highlights every page and block that’s been edited in a change request. There are two options when using diff view:- Show all pages — Shows both modified and non-modified pages in the table of contents. Good for seeing which pages have been edited in context.
- Show only changed pages — Shows only modified pages in the table of contents, helping you focus on changed content. Particularly helpful in larger spaces.
Members with an editor role can create and submit requests, but only members with reviewer or above roles can merge change requests. When setting your permissions, keep in mind the type of edit and review dynamic you want to achieve!