π How I Use Obsidian Git to Automate My Blog Publishing
A simple guide to setting up Git in Obsidian so you can publish Markdown posts directly to GitHub Pages β fast, clean, and code-free.
Writing blog posts in Markdown is great. But what if you could write, version, and publish your posts to GitHub Pages β without switching apps or running Git commands?
Thatβs exactly what Iβve done using the Obsidian Git plugin.
Hereβs how I set it up in less than 5 minutes.
π§± Prerequisites
Before you begin, make sure you have:
- Git installed on your system
- A GitHub repository set up for your blog (I use Jekyll + GitHub Pages)
- Your Obsidian vault pointing at your blog repo (e.g.,
_posts/,_config.yml, etc.)
π¦ Step 1: Install the Git Plugin
- Open Obsidian
- Go to Settings β Community Plugins
- Disable safe mode, then click Browse
- Search for βGitβ (by Denis Olehov)
- Click Install, then Enable
βοΈ Step 2: Configure the Plugin
Once enabled, go to Settings β Git and tweak these options:
| Setting | Value |
|---|---|
| β Auto pull on vault open | Enabled |
| β± Auto commit & push | Leave disabled (optional) |
| π Commit message template | Blog update on {date} |
| π Manual sync (preferred) | Use Cmd + P β Git: ... |
This gives you full control over what gets committed and when your blog goes live.
βοΈ Step 3: Write and Publish
Now your flow is simple:
- Create or edit a Markdown post in
_posts/ - Save changes
- Open the command palette (
Cmd + P) - Run:
Git: Commit all changesGit: Push
Your Markdown is committed, pushed, and live on GitHub Pages within seconds.
π§ͺ Bonus Tips
- Add a
.gitignoreto avoid pushing workspace or plugin settings - You can also auto commit on save if youβre comfortable with frequent syncing
- Want to preview your site? Use
jekyll servelocally or just trust the GitHub Pages rebuild
Final Thoughts
Using Obsidian Git turns your vault into a fully working static site editor β no terminal needed. Perfect for developer blogs, tech journals, or any writing workflow you want to back with version control and instant publishing.
Let me know if youβd like my .gitignore, or a starter blog post template!