For anyone looking to efficiently back up their Obsidian vaults or publish blog posts directly from Obsidian, setting up Git integration is an excellent solution. Here’s a step-by-step guide on how to achieve this setup seamlessly.
1. Fork or Create a Repository
The journey begins with creating or forking a repository on GitHub. If you are starting with a blog project, consider using a starter template repository. Once you fork or create your desired repository, this will serve as the storage space for your Obsidian vault files.
2. Install Git
Git installation is essential. For macOS users, Git is often pre-installed. Windows users can follow the official Git installation links to set up the software. This tool acts as the bridge between your local files and the remote repository on GitHub.
3. Generate a Personal Access Token
GitHub requires authentication to access and manage your repositories. To achieve this:
Navigate to the GitHub settings (accessible from the top-right corner of your GitHub profile).
Select “Developer Settings” and click on “Personal Access Tokens.”
Opt for “Tokens (Classic)” and generate a new token.
Configure the token with repository access and set an expiration date or choose no expiration.
Save this token securely as it’s needed for future authentication.
4. Install the Obsidian Git Plugin
Activate community plugins within Obsidian, then search for and install the “Obsidian Git” plugin. Enable the plugin and address any errors, such as the “not a GitHub repository” message, by ensuring the repository is correctly linked.
5. Clone the Repository
To connect the repository to your Obsidian vault:
Create a local folder to store the repository (e.g., “Remote Blog”).
Use the command “Clone an Existing Remote Repository” in the Obsidian Git plugin.
Provide the repository’s URL, embedding the personal access token into it.
Specify the directory for the clone operation.
6. Sync Files
Once cloned, restart Obsidian and test the integration by making edits in your vault. Run the backup command to sync changes to the remote repository. Any changes made locally will now reflect in the GitHub repository.
Thanks for reading , checkout LiveAPI ; super convenient API documentation generation solution for your team.