Git is a version control system for tracking changes in computer files and coordinating work on those files among multiple people.
Probably the most popular way to store documentation, the Git module can effortlessly synchronize with any remote Git repository.
For convenience, instructions for the most popular Git providers are listed below. However, this module should work for virtually any standard Git provider.
You must have Git 2.7.4 or later installed on the system to enable this module!
The docker image already contains this dependency.
A Git repository must be dedicated to Wiki.js. It is not possible to use only a subfolder or submodules at the moment.
Coming soon!
Coming soon!
GitHub is the most popular git source control provider.
ssh-keygen -t rsa -b 4096
/etc/wiki/github.pem
) and press Enter.On Windows, you can use Git Bash or Windows Subsystem for Linux (WSL) distributions like Ubuntu for Windows to run the commands above. You can also generate keys manually using the puttygen utility.
.pub
)ssh
main
./data/repo
value.Coming soon!
When enabling the Git storage module for the first time with a remote repository that already has content, you might need to initiate a manual import. By default, only changes between the latest local commit and the latest remote commit will be imported.
Heads up! Make sure the Git module is already configured and working before proceeding any further!
To force an import of all content currently present in the local repository, load the Git module settings tab in the Administration Area (under Storage), scroll to the very bottom of the page and click Run button on the Import Everything action card.
If content was created in Wiki.js before you enabled the Git storage module or if you temporarily disabled the module, that content will be missing from the remote Git repository.
Heads up! Make sure the Git module is already configured and working before proceeding any further!
To fix this issue, load the Git module settings tab in the Administration Area (under Storage), scroll to the very bottom of the page and click Run button on the Add Untracked Changes action card. This will force all content currently in the DB to be output to files in the local repository, add these files to git tracking and create a single commit.
Note that this will not perform a sync with your remote repository. You must either wait for the next synchronization to occur, or manually force a sync using the Force Sync action.
For performance reasons, new commits are only synced on a regular interval (every 5 minutes by default). You can change the schedule in the Git storage module settings.
Load the Git module settings tab in the Administration Area (under Storage), scroll to the very bottom of the page and click Run button on the Force Sync action card.