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 'Impostazioni' 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โ e โ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.

Esito finale #
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.


