BetterDocs PRO is introducing Git integration, a smarter way to sync your documentation instantly with your Git account. Follow the guidelines below to learn how to connect the GitHub repository to BetterDocs.
Step 1: Configure BetterDocs Settings #
First, go to BetterDocs ‘Settings’. From there, select the ‘Git Sync’ tab to manage the settings with your Git account. Toggle the ‘Enable’ button to get started with syncing your GitHub or GitLab account.

Step 2: Connect Your GitHub Account #
Next, from the ‘Repo Settings’, you have to connect your GitHub doc repo. You can either click on ‘Connect with GitHub’ or to add a GitLab account, go to the ‘GitLab’ tab to connect your account with access tokens. Let’s have a look at both of these processes.
Note: To know the detailed process of connecting your GitLab account, check the documentation.
Step 2.1. Connect with GitHub #
First, click on the ‘Connect with GitHub’ button. After clicking on that, you will be asked to log in to your GitHub account. Enter your GitHub Username and Password to sign in.
After signing in, you will find the interface to install and authorize your account. Here, you can choose the repository you want to connect with BetterDocs.
Note: By allowing the repository permission, BetterDocs will only take read access to your meta data and read and write access to your code.

Click on the ‘Install and Authorize’ button to connect to your GitHub account with BetterDocs.
Step 3: Configure the GitHub Integration Settings #
Now, after connecting with your GitHub account, select the repository where you want to sync the documentation. After selecting it, select the specific branch and doc directory. Then, you can configure ‘File Naming Convention’, which means how to name Markdown files in the repository and enable or disable the ‘Auto Sync’ option for automatically syncing changes to Git when docs are saved. Click on the ‘Save’ button to save the settings.

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 ‘GitHub Sync.’

Click on the button, and then you will find the option to ‘Push’ the doc in your GitHub repository. Then, after successfully fetching the document, give a ‘Summary’ for your documentation. You can also add a description if needed. Then click on the ‘Commit & Push to’ button to push the documentation on your selected branch.

You will find more options to ‘Pull from GitHub’ and ‘Import MD Files’. If someone changes the documentation in your GitHub repository, you can simply click ‘Pull from GitHub,’ and the changes will be automatically applied to your BetterDocs documentation.

Similarly, you can import all the MD files from your GitHub 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.

Final Outcome #
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 GitHub account.

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