Backup your Obsidian.md vault with git
Simple plugin that allows you to backup your Obsidian.md vault to a remote git repository (e.g. private repo on GitHub). This plugin assumes you have existing git repository initialized locally and credentials are setup.
On advantages of backing up your vault with git I suggest reading this amazing article by @tallguyjenks. You can find a "how-to" on git repository setup there as well, this plugin does not expose an interface to initialize git repository (yet).
Synergises well with GitJournal mobile markdown note taking app.
With this plugin enabled, you are able to configure the following:
Note: it is recommended to exclude obsidian workspace cache files from the repository (or even whole
.obsidiandirectory) due to potential noise in the git history.
If you'd like to do that, scroll to the bottom for a short guide.
Custom plugins are only available for Obsidian v0.9.7+.
If you have Obsidian 0.9.8+, you can install this plugin from "Settings > Third Party Plugins > Obsidian Git".
Download zip archive from GitHub releases page. Extract the archive into
Alternatively, using bash:
bash OBSIDIAN_VAULT_DIR=/path/to/your/obsidian/vault mkdir -p $OBSIDIAN_VAULT_DIR/.obsidian/plugins unzip ~/Downloads/obsidian-git_v1.1.0.zip -d $OBSIDIAN_VAULT_DIR/.obsidian/plugins
To exclude cache files from the repository, create
.gitignorefile in the root of your vault and add the following lines: ``` .obsidian/ # to exclude Obsidian workspace settings (including plugin and hotkey configurations)
.obsidian/workspace # to exlude workspace cache
.trash/ .DS_Store ```
If you have any kind of feedback or questions, feel free to reach out via GitHub issues or
@evrwhron Obsidian Discord server.
If you like what I do, you could consider buying me a coffee. It is unnecessary, but appreciated :) https://www.buymeacoffee.com/evrwhr