Obsidian Github Integration for Sync and Version Control

:fire: perfect, thank you!!

@hieu - I’m very much not a developer, myself

Are you looking for help with Git/Github, or are you familiar with that part of the process? There’s a lot to unpack there, so I’d rather know your level of comfort before I walk through the process.

For the Obsidian part, I go to settings and set the ‘New link format’ to ‘Absolute path in vault’ *Disclaimer - some folks don’t like this as much, because the link format is not as clean as wikilinks. It is a standard link format, though, and works across platforms very well.

Then, using the Github app on Android, I can open the repository and navigate the files. The links work in the app like they do in Obsidian. This is the ‘view-only’ interface I mentioned.

I don’t do much editing on mobile, mostly because it’s messy. I’ve edited straight through the Gihub app, and I have Markor installed - it will also work in a pinch. I could not get Git journal to do what I wanted.
Good luck!

After using some self-written scripts myself I switched to

It handles the sync great, adds sanity checks, adds news files etc. It even runs fine on Windows using the bash shell that comes included in the Git client distribution.

6 Likes

Thanks! This is useful

I am on windows and tried to let the git-sync script run with the windows task-scheduler every X Minutes. But eventhough for a very short pereiod of time a git-bash windows opens the script doesnt run. When I start the script manually (double click, with cmd or git-bash) it pushes and commits correctly.

Has anyone worked out a good solution to automate this process on windows?

Edit: I found my problem. I forgot to include the directory where the script has to run in the task scheduler

But still one question is left: Now a git bash window is opened every X minutes and it syncs my files. But is there a way to let this process run without opening a window of git-bash?

@jonschke Did you find a solution for this? let me know! [email protected]

I would also like to know.

@mangosteel @msamedic I think this might help: Setting up Obsidian Git on Windows for the tech uninitiated (with images)

2 Likes

Thank you @argentum, I have tried watching multiple different tutorials on making this work and my first few tries I was trying to combine their methods to no avail. I had given up until my computer crashed today and I lost hours of work on a note that had been replaced entirely with some kind of colored special character (red dots). Luckily, I have ManicTime screenshots so I will be able to transcribe my work.

Let this be a warning to those placing important information in these notes. After that, I decided I needed backups and since version history is so valuable, and since people seemed to be able to get this git backup working with the new plugin, I figured I’d give this one last go.

The link you provided, followed exactly step by step, works like a charm. And it’s clearly explained. Very simple.

I think I will also be setting up a local automatic backup of my vault. Thanks again.

Backups are extremely important! There is also a new File Recovery feature in case something happens too:

Unfortunately the File Recovery feature was the reason I thought I was safe in the first place. This feature was only able to recover a single save from a few days ago which is of no use to me. I do not think it’s fully functional yet (or at all, in my case).

@mangosteel that doesn’t sound right. File Recovery creates snapshots of your files every 5 minutes by default (unless you changed the settings). Since this is getting off-topic for this thread, feel free to open a #bug-reports or #get-help thread for this.

When I copied the script from the forum all the quotes had been changed for curly quotes and that was causing it not to work. Maybe that’s the cause?