DEV Community

Syed Yakoob Shiraz
Syed Yakoob Shiraz

Posted on

Build a Version-Controlled Second Brain with Joplin and GitHub

Take notes in Markdown. Save them automatically to Git. Back them up like a developer.


Introduction

Every developer needs a place to store notes — ideas, docs, bug fixes, commands, bookmarks, and those elusive "read later" links. But what if your note-taking app worked like GitHub?

Joplin is a privacy-first, open-source note-taking app built for power users. And with one plugin, you can turn it into a Git-backed knowledge base — syncing your notes as Markdown files with version control.

In this article, we’ll show you how to set up Joplin, install the Git sync plugin, and connect it to GitHub — step by step.


Step 1: Install Joplin

Joplin is available for Windows, macOS, and Linux.

🔗 Download:

Joplin also has mobile apps and a browser web clipper — but we’ll focus on the desktop app here.


Step 2: Install the "Save Note as Markdown and Commit to Git" Plugin

This plugin automatically:

  • Saves each note as a Markdown file
  • Commits it to a Git repo with a timestamped message

🛠 How to Install:

  1. Open Joplin.
  2. Go to Tools > Options > Plugins (on Windows/Linux) or Joplin > Settings > Plugins (on macOS).
  3. Click “Search” and type:
   Save Note as Markdown and Commit to Git
Enter fullscreen mode Exit fullscreen mode
  1. Click Install next to the plugin.
  2. Restart Joplin when prompted.

🔗 Plugin Page: https://joplinapp.org/plugins/plugin/io.sagaii.export2git/


Step 3: Create a GitHub Repository

Before we push your notes, let’s create a GitHub repository.

🖥️ How to Create a GitHub Repo:

  1. Log in to your GitHub account.
  2. Click the "+" icon in the top right corner, and select "New repository".
  3. Give your repository a name, like joplin-notes.
  4. Set it to Public or Private as per your preference.
  5. Do not initialize the repository with a README or .gitignore file, as you will be pushing your local notes.
  6. Click Create repository.

Step 4: Configure the Plugin – Set Up Local Git Repo

Now that you have your GitHub repository, let’s configure Joplin to sync with it.

🧭 Where to Find the Plugin Settings

On Windows/Linux:

  • Tools > Options > Save Note as Markdown and Commit to Git

On macOS:

  • Joplin > Settings > Save Note as Markdown and Commit to Git

📁 Set the Local GitRepos Folder Path

In the plugin settings, set:

Local GitRepos Folder Path
Enter fullscreen mode Exit fullscreen mode

To something like:

  • macOS/Linux: /Users/yourname/JoplinGitNotes
  • Windows: C:\Users\yourname\Documents\JoplinGitNotes

If the folder doesn’t exist yet, create it manually.

Optional Recommended Settings

Setting Recommended Value
Auto Commit on Save ✅ Enabled
Commit Message Template Update: {{noteTitle}} at {{date}}
Author Name / Email Your Git identity

Step 5: Push Your Local Git Repo to GitHub

Once you've set up your local folder and initialized Git, let’s connect it to GitHub.

🖥️ Connect Your Local Repo to GitHub

  1. Open your terminal or Git Bash.
  2. Navigate to your local Joplin Git folder:
   cd /path/to/JoplinGitNotes
Enter fullscreen mode Exit fullscreen mode
  1. Initialize the Git repository:
   git init
Enter fullscreen mode Exit fullscreen mode
  1. Add the remote GitHub repository:
   git remote add origin https://github.com/your-username/joplin-notes.git
Enter fullscreen mode Exit fullscreen mode
  1. Add all files to Git:
   git add .
Enter fullscreen mode Exit fullscreen mode
  1. Commit the files:
   git commit -m "Initial commit"
Enter fullscreen mode Exit fullscreen mode
  1. Push to GitHub:
   git push -u origin master
Enter fullscreen mode Exit fullscreen mode

Now, your local Git repo is connected to GitHub, and your notes are backed up!


Step 6: Export and Commit Notes to GitHub with One Click

Once your folder is set and Git is initialized, pushing notes is simple.

🚀 Exporting a Note

  1. Select the note in Joplin.
  2. Click the “Export as Markdown and Commit to Git” button on the toolbar.
    • It may look like a file with a Git icon.

Export as markdown and commit to git button

  1. The plugin:
    • Saves the note as a .md file
    • Commits it using your configured message

github image

🟡 Manually Push to GitHub

If this is your first time, initialize and push:

cd /path/to/JoplinGitNotes
git push
Enter fullscreen mode Exit fullscreen mode

(Optional) Step 7: Automate Git Push

You can push changes on a schedule.

On macOS/Linux:

Use crontab -e to add:

0 * * * * cd /path/to/JoplinGitNotes && git push
Enter fullscreen mode Exit fullscreen mode

On Windows:

Use Task Scheduler or a .bat script:

cd C:\path\to\JoplinGitNotes
git push
Enter fullscreen mode Exit fullscreen mode

Conclusion

With Joplin and this plugin, you now have:

  • A local-first, Markdown-based note system
  • Git version control for tracking every update
  • Optional cloud sync with GitHub for backup and access anywhere

You’ve just built your own version-controlled second brain — and it runs on free, open tools.

Happy documenting! 🧠 💾

Made with ❤️ by syedyshiraZ

Top comments (0)