Git™ Repository

Publii version 0.44 introduces Git™ repository support, enhancing website synchronization and data management.

Note: Starting with version 0.44, Publii is beginning the phase-out of GitHub and GitLab integrations. These integrations will be fully deprecated by version 0.46, which is expected to be released in early 2024.

The Upside of Git™

Git™, a widely used version control system, now forms a core part of Publii's data synchronization process. By incorporating Git™, Publii now offers more robust and versatile support for various repository services, such as GitHub, GitLab, and Bitbucket, thus broadening the scope for user compatibility and flexibility in website management.

Detailed Workflow Process

With the new update, Publii's workflow optimizes website updates using Git™. Here's how it works:

  1. Content Pulling: Publii initially performs a check against your Git™ repository, verifying if the content aligns with the local version in Publii. This step is critical in ensuring no discrepancies between the repository and the local content. This verification process is crucial to preventing conflicts during synchronization and maintaining the integrity of your content updates.

  2. Website Content Overrides: When rendering the website, the content from your local version of the website takes precedence over the current state in the repository. Any updates or changes you have made locally will supersede what is in the repository.

  3. Commit Creation and Push: After synchronization, a commit is created from the files that have been changed. This commit is then pushed back to your Git™ repository. This process ensures that your repository is up-to-date with the latest changes made to your website.

Essential Reminder: Remember, changes made in your Git™ repository won't impact your website content as they will be overridden by Publii's rendering process and the new commit generated from your local changes.

Configuration Guide

Before you dive into the Git™ settings, it's essential to understand the role of each field. The configuration you apply here will set the stage for how Publii communicates with your Git™ repository, ensuring your content is seamlessly pushed to the web.

Git Repository UI

After selecting 'Git™ Repository' as your server type in the server settings, proceed to fill in the Git™ repository details:

  • Website URL: The URL of your live website. This is the address where your site will be accessible to the public once deployed. Ensure it matches the domain you plan to use. If you employ a custom domain, this URL should be the domain name (e.g.,

    Please remember to place a CNAME file in the root files under the File Manager tool if you use a custom domain. Additionally, if you have files that Publii does not generate but want to be retained during synchronization, it's essential to also locate these files in the File Manager. This step ensures that external or manually added files are not overwritten or deleted during the synchronization process with Publii. 

  • Repository URL: Your repository's web address.
  • Branch: 'main' or 'master' are the usual suspects.
  • Username: The identity you assume with your Git™ service.
  • Password/Token: A secret key or a personal access token. If you use 2FA to protect your account, you must use a previously generated access token instead of a password.
  • Commit author email: The scribe of your commits.
  • Commit message: "Publii: update content" is a solid default.

What are you waiting for?

Start building your site today.

  1. 1 Download Publii
  2. 2 Write your content
  3. 3 Publish your site
Create website