Skip to content

Obsidian desktop plugin. Create a backup of the vault and sync it with a GitHub repository

Notifications You must be signed in to change notification settings

moudev/obsidian-async-vault-with-github-plugin

Repository files navigation

Sync vault with GitHub

Obsidian desktop plugin to sync the obsidian vault with GitHub. Only tested with one vault.

Requirements

Manually installing the plugin

  • Download the .zip file from the releases page. Chose the last version plublished
  • Unzip the file and copy their content in the plugins/ directory of your vault. VaultFolder/.obsidian/plugins/
  • Enable the plugin from Obsidian settings in the Community plugins option
  • Follow Plugin configurations

Plugin configurations

This plugin has two things to configure. The GitHub url repository and files to ignore. Only the first is required and the other is optional.

Config the GitHub URL repository (required)

  • Make sure to install the requirements
  • Configure the GitHub credentials in your computer
  • Create a GitHub repository with the name that you want. It can be public or private
  • Click on the green button "<> Code" and copy de "HTTPS" link. Example: https://github.com/username/my-obsidian-vault.git
  • Open Obsidian settings and click in the Plugins community section click in the plugin name
  • Paste the HTTPS link in the GitHub URL repository field and click on "Configure repository"

Config the files to ignore (optional)

It's the content of the .gitignore file. One line for file. You can use all the gitignore patterns. All the files added in this field won't be tracked for changes

Example:

# .gitignore file
ignore-specific-file.md
.obsidian-directory/

Make a backup

  • In the Obsidian sidebar you will see a list of icons. Click on the icon that has the tooltip "Sync vault with GitHub"
  • A modal will be open with the list of files that has changes from the last backup. If there is not changes then the button submit won't be displayed
  • You can change the "commit message"
  • Click on the submit button and the changes will be upload to the GitHub repository
  • Note: only will be listed the files that aren't in the files to ignore field of the plugin configurations

Development

  • Open a terminal in the path of the obsidian's vault
  • Enter in the .obsidian/plugins/ directory
  • Clone this repo with git clone
  • Enter in the repository directory
  • npm i or yarn to install dependencies
  • npm run dev to start compilation in watch mode
  • Enable the plugin from Obsidian settings in the Community plugins option
  • Complete Plugin configurations