GitBook provides Git Sync function, which can perfectly solve the problem of unsynchronized documents and code base. Here's how to do it: First, go to the space settings, select the "Git Sync" option, and then authorize your GitHub or GitLab account. After authorization, you can select the code repository and branch to be synchronized.GitBook supports two-way synchronization, which can automatically push document updates to the code repository, and can also pull the latest document changes from the code repository. Each edit automatically generates a commit record, keeping the documentation consistent with the code. To ensure smooth synchronization, you need to check and set the correct permissions on your repository, and if you experience delays in synchronization, you can check your network connection or contact the GitBook support team.
This answer comes from the articleGitBook: A Collaboration Platform That Uses AI to Aid in the Creation and Search of Technical DocumentsThe