Using Dendron with Github and Git

March 31, 2021
2 minute read
dendron software productivity

Since a few months I’m an excited user of Dendron a note-taking and knowledge management tool based on VSCode and use it with git to synchronise between different machines and mobile devices.

A recent conversation on Discord showed that it can be difficult for new joiners to get Dendron up and running with git so I thought to post a little tutorial how this can be achieved. I hope this is useful for some. If I omitted steps since they appeared too obvious please let me know and I’ll update the info.

The goal is to have a Dendron “vault” synced between at least two machines.

Step 1 Set up a Git repo

I’m using Github here as an example but any git service will work as long as all machined can access it. To create a new repo log on to Github and click on “New” on the repositories tab.

In the follwoing screen choose a name (or accept the suggested name) and decide if the repos is going to be private or public.

Create a new Github Repo

After creation note the git URL in the clone command on the next page and copy it.

Quick setup

Step 2 Create a Dendron workspace

Start Dendron and create a new workspace if you don’t have one yet using the command Dendron: Initialize Workspace. This will create a new workspace with an empty vault that looks like this (I’m using VSCodium here)

New Dendron workspace

Of course any existing workspace works just as well.

Now add a new vault via Dendron: Vault Add and choose remote and custom

Add vault

Custom endpoint

and enter the clone URL you copied above. Dendron will create a new vault using the name and populate it with a root.md note.

Now create notes as you see fit and commit them using the source control view from the sidebar

Source Control

Finally push to the remote Github repo.

If you want you can now delete the default local vault via Dendron: Vault Remove.

Step 3 Sync to another machine

On your other machine follow the same steps to also add a remote vault again using the git URL from above. All commited and pushed changes should be present now.

Going forward

From now on follow these steps on each of the machines:

There are some extensions that can be useful for working with git. One of my favourites is auto-git which - as the name suggests - automatically commits and pushes changes to a remote repository.

Share on:

Thanks to Wayback Machine

November 20, 2021
1 minute read
software

Using SSH Agent on Windows

November 10, 2021
2 minute read
security software

Dendron Schemas

May 22, 2021
3 minute read
dendron software
comments powered by Disqus