Introducing Git Integration in BetterDocs PRO, a smarter, faster way to keep your documentation synced directly with your Git account. Follow the guide below to explore how to connect the GitLab repository to BetterDocs to get started seamlessly.
Step 1: Configure BetterDocs Settings #
To begin, navigate to BetterDocs 'Configuraciones' and open the âGit Syncâ tab. From there, you can configure and manage the connection with your Git account. Simply toggle the âEnableâ option to start syncing your GitLab account seamlessly.
Nota: To connect your GitHub account, check the step-by-step process in this documentation.

Step 2: Connect Your GitLab Account #
To connect your account with GitLab, enter your GitLab Project ID and Access Token. Create a token at GitLab Settings â Access Tokens. From there, copy the token ID and project ID. Then paste it in your BetterDocs settings. Click on the âConnect GitLabâ button. After that, your GitLab account will be automatically connected to BetterDocs.

Step 3: Configure the GitLab Integration Settings #
Now, after connecting with your GitLab account with Project ID and Access Token, select the repository where you want to sync the documentation. After selecting it, select the specific branch and doc directory. Next, configure the âFile Naming Conventionâ to define how Markdown files will be named in your repository. You can also enable or disable the âAuto Syncâ option to automatically sync documentation changes with Git whenever docs are saved. Once everything is set up, click the âSaveâ button to apply your changes.

Step 4: Sync the Documentation #
Go back to the documentation that you want to sync in your Git repository. There, you will find an option on the top right side of the documentation named âGitLab Sync.â

Click the button to access the option for pushing the doc to your GitLab repository. Once the document is fetched successfully, add a âSummaryâ for your documentation and include a description if needed. Finally, click the âCommit & Push toâ button to publish the documentation to your selected branch.

You will also find options to âPull from GitLabâ y âImport MD Filesâ. If any changes are made to the documentation in your GitLab repository, simply click âPull from GitLabâ to automatically sync and apply those updates to your BetterDocs documentation.

Similarly, you can import all the MD files from your GitLab repository right inside your BetterDocs documentation. Click on âImport MD Filesâ and select the documentation you want to import. Then click on the âImport Selectedâ button to import the file.

Resultado final #
Finally, in your Git Repository, you will see that the documentation is synced with your BetterDocs knowledge base. This is how you can easily document on BetterDocs and a GitLab account.

If you face any difficulties, feel free to contact our support team.

