Set Up Git Backup for Obsidian
Keeping your Obsidian vault backed up is essential if you care about your notes, ideas, and long-term knowledge base. In this guide, you’ll learn how to set up a reliable Git-based backup for Obsidian using GitHub and the Obsidian Git plugin. By the end, your notes will be automatically committed and synced in the background, giving you version history, easy recovery, and peace of mind across devices.
Initialize Git in Your Obsidian Vault #
Open a terminal and navigate to the root folder of your Obsidian vault:
cd YOUR_OBSIDIAN_PATH
Initialize a Git repository:
git init
Ensure your local repository uses the main branch:
git branch -M main
Create a GitHub Repository #
- Go to your GitHub account.
- Create a new repository (empty, no README required).
- Copy the SSH URL of the repository.
Add the GitHub repository as the remote origin (if not already added):
git remote add origin [email protected]:YOUR_USERNAME/YOUR_REPO_NAME.git
Set the upstream branch and push the initial state to GitHub:
git push -u origin main
This links your local main branch to the remote main branch and allows future pushes and pulls without specifying the remote or branch name.
Install and Configure the Obsidian Git Plugin #
- Open Obsidian → Settings → Community plugins
- Enable Community plugins
- Click Browse and search for Git
- Plugin: Git
- Author: Vinzent (Denis Olehov)
- Install and enable the plugin
(Restart Obsidian if prompted)
Configure Auto Backup #
Go to Settings → Git and set:
- Auto commit-and-sync interval (minutes): 10
- Auto commit-and-sync after stopping file edits: Enabled
You can leave all other settings at their default values.
Your Obsidian vault will now automatically commit and push changes to GitHub, giving you continuous backups with version history.