Find & replace or make batch changes across your GitBook docs with Git Sync
Sync your docs to GitHub or GitLab and make bulk changes to your docs with a single pull request
Last updated
Sync your docs to GitHub or GitLab and make bulk changes to your docs with a single pull request
Last updated
When you change something about your product, manually updating your documentation in all the affected places can be a real pain. Thankfully, with in GitBook, it’s a simple process.
Because Git Sync links your documentation to a GitHub or GitLab repository, you can make changes from your code editor and they’ll automatically sync to your docs when you merge. It’s the best way to find & replace a specific word or phrase, or make bulk changes to your docs.
Here’s how it works:
Now that your content is synced, you can make changes to your docs from your repository:
First, create a new branch of your repository in GitHub or in GitLab.
Next, follow GitHub’s guide on cloning a repository to download a local version of your branch. Once you’ve downloaded your branch, open it in VS Code or your preferred code editor or IDE.
Use your editor’s find & replace feature to make bulk changes across multiple files at the same time.
After making your edits, you can commit them to your branch in the local Git repository.
When you’re ready, push the changes to your remote repository on GitHub or GitLab.
Create a pull request in GitHub or a merge request in GitLab for your branch. Doing this will automatically create a change request in GitBook with all your changes included.
You can request a review of your changes in either GitHub or GitLab. When you’re ready, you can merge the changes to update your documentation in GitBook.
Note: You can also review and merge your changes in the GitBook editor. However, when using find & replace on text you may accidentally replace text within configuration files like SUMMARY.md
or .gitbook.yaml
.
This could cause broken links if not properly updated, so you should always check your changes in GitHub and GitLab before merging.