Thursday, December 25, 2025

Syncing Obsidian Notes throughout units utilizing Git and GitLab · Ponderings of an Andy


Introduction

I take loads of notes. About 5 years in the past I switched from using notebooks, as a result of I used to be going by them so shortly, to a
Rocket E-book. This feels similar to a pocket book, with the profit that it’s reusable. It additionally has an software that enables me to shortly
scan a web page and reserve it to considered one of a number of areas. It is very useful. The draw back is that the OCR is not good (oooor, my handwriting is unhealthy) and the
annoyance of cleansing the pages each week or so. I’ve discovered that if I do not let the pages dry utterly, then the following time I’m going to make use of that web page it
has a superb movie over it that makes writing a little bit harder. Suppose writing with a pen that’s low on ink.

I found Obsidian some time in the past. I’ve put a little bit little bit of effort into using it, however extra lately I’ve dedicated to using it extra.
The concept of all digial notes is attractive. Over time I will see if it is useful.

However, like anybody with a number of units, I would like my Obsidian vault on all units. What if I’ve a thought whereas I am away from my most important pc? One choice is to make the most of the Obsidian Sync function. It is obtained finish to finish encryption, model historical past and a month-to-month subscription charge. I can construct one thing utilizing my present GitLab set up with out that month-to-month subscription charge. Plus, since I am the one person of this, I am happy with a little bit commerce off {that a} full service offers.

Repository Setup

GitLab

Inside GitLab arrange a brand new challenge by clicking on “New Challenge” within the higher proper.

Choose the choice to create a brand new clean challenge.

Create a blank repository

Now we have to arrange the challenge particulars. Choose a reputation that’s significant for you. I’ve utilized andy-notes within the screenshot under. I additionally created this with out a README, as a result of I will generate the preliminary repository in a second and push it as much as the server.

New project details - without a precreated README

Repository Initialization

This set of steps solely has to happen as soon as. All units will be capable to begin with the following part.

Open the command immediate or terminal (relying on what your working system calls the system console). Navigate to the situation you need your notes to be saved. In my case, I created a brand new listing to match the identify of my repository. I then created a .gitignore with the next content material within the listing.

.obsidian/*
!.obsidian/app.json
!.obsidian/look.json
!.obsidian/config
!.obsidian/community-plugins.json
!.obsidian/core-plugins.json
!.obsidian/graph.json
!.obsidian/hotkeys.json

This could ignore the vast majority of the .obsidian hidden listing between my units, however preserve a number of key objects. I’ll replace this over time, however for now that is working effectively.

Now, initialize the repository.

cd andy-notes
git init --initial-branch=most important
git distant add origin git@:andy/andy-notes.git
git add .
git commit -m "Preliminary Commit"
git push --set-upstream origin most important

We’re prepared to begin using Obsidian and GitLab!

Obsidian Setup

First Open

Now that the backend repository is about up and it has been initially configured, all cases of Obsidian can make the most of these units of steps to begin working.

If this isn’t the machine you initilized the repository on, it is advisable to carry out an preliminary pull of the repository to this machine in order that it’s a native folder.

git clone git@:andy/andy-notes.git

Open Obsidian. Since that is the primary time you might be opening it, you may be requested to pick out the place your vault is saved. You need to choose the “Open folder as vault” choice.

Open an existing folder as your vault

Choose the situation that your repository has been cloned into.

Allow Plugins

Obsidian has assist for neighborhood constructed plugins. There are plugins to do every kind of issues to enhance your writing and observe taking. I encourage the reader to look by or seek for plugins which will allow you to. We, nonetheless, want one particular one to perform our aim of syncing the vault over to GitLab.

To put in neighborhood plugins we have to allow this function. Within the decrease left of the workspace, click on the gears icon. Then click on on “Group plugins”, and at last “Activate neighborhood plugins”

Enable Community Plugins

With this enabled, now you can browse the neighborhood plugins. To take action, click on the browse button.

Browse community plugins button

Seek for Obsidian Git. Whereas scripting this, it was the primary outcome. You need to be in search of the one by Vinzent. Click on on the cardboard to tug up plugin particulars and potential actions.

Obsidian Git in the Community Plugins marketplace

Then click on “Set up”. The set up course of ought to solely take a second or two.

Install the Obsidian Git plugin by clicking the install button

You may obtain a affirmation within the higher proper if the set up is profitable.

Successful plugin install confirmation message

Lastly, allow the brand new plugin. The earlier “set up” button has modified to be “Allow”. Click on that.

Enable new Obsidian Git plugin

Configure Obsidian Git

With the Obsidian Git plugin put in, it is time to configure it. There are a number of fast settings to fill out. First, it is advisable to click on the “Choices” button.

Obsidian Git plugin configuration options

The primary setting to vary is how typically you need the backup to GitLab to happen. This computerized again up is disabled by default. I set mine to be each 5 minutes.

Adjust the backup interval

Subsequent, allow Pull updates on startup in order that the occasion of Obsidian that’s operating is at all times updated. Your notes from different units will probably be synchronized when Obsidian launches and you may get proper again to writing.

Enable pull updates on startup with this toggle

Make sure you add the Creator identify and e mail tackle. That is the knowledge that will probably be despatched on every commit.

Commit Author information

I additionally adjusted the autocommit message to incorporate the hostname of the machine performing the commit. I’ve been going forwards and backwards on whether or not that is vital sufficient for me to maintain since I am the one one which makes use of this vault. However, if you wish to alter the messages there are two cases the place the commit message may be modified.

Adding the hostname to the automatically generated commit messages

Outcomes

After performing the steps above, this occasion of Obsidian is able to make the most of GitLab to sync your vault without spending a dime. Every new occasion solely must have the Obsidian Git plugin put in, enabled and configured.

After you’ve got configured your occasion, once you open Obsidian the plugin will pull modifications from the repository and allow you to know that all the things has been up to date.

Obsidian successfully updated the vault after opening

Then on a scheduled foundation – 5 minutes in my case – it is going to commit and push modifications to GitLab.

Successful autocommit

In GitLab, this commit will ought to present up instantly.

GitLab commit

Conclusion

I now have Obsidian arrange on my most important units. I’ve loved the power to have my notes accessible as quickly as I open the appliance. Total, this was fairly straightforward to arrange. It looks like loads of steps, however the one time setup makes it for much longer than putting in and configuring a plugin for every new occasion truly takes.

I am attempting to maintain my notes digital and I am hopeful that this new arrange will assist. I can transfer between computer systems for private initiatives as a substitute of questioning what I had present in my analysis as a result of I left it on one other tab on one other machine and forgot to place it with the remainder of my notes. Now, it simply occurs.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles