Joplin: Feature request: Synchronising with git

Created on 26 Aug 2020  Â·  7Comments  Â·  Source: laurent22/joplin

I like Joplin, and am looking for a OneNote replacement. I don't want to have to setup WebDAV on a server of mine, nor do I like the idea of using OneDrive or DropBox.

Ideally would be git as a sync backend. I'd love to see diffs of all my changes and such as well.

If this is in-line with the goals of the project, I am willing to contribute code. I just don't want to waste my time if the maintainers here would reject this idea because it doesn't line up with the goals of the project.

stale

Most helpful comment

In theory I'll accept it but in practice I'm not sure there's any easy way to add this while supporting both mobile and desktop clients, but if @AaronTraas has some ideas on how to implement this I'd be glad to hear them.

All 7 comments

This is a duplicate of #753. It seems that the original was labeled as an enhancement, which means it's probably not entirely out of line.

I would guess that the viability of this pull request probably hinges on the complexity of adding it. If it's fairly simple I imagine that it will get picked up for sure, but if it requires sweeping changes to the sync logic then it's probably DoA.

@laurent22 would you accept a pull request for this?

In theory I'll accept it but in practice I'm not sure there's any easy way to add this while supporting both mobile and desktop clients, but if @AaronTraas has some ideas on how to implement this I'd be glad to hear them.

Hi, first of all: very nice tool, thanks! I'm also about to use a self-hosted git-server (Gitea) for sync between multiple remote users (by having a local file-system sync from Joplin to a folder which is a local git image of the remote repo on the git server). We will see how this works out; merging conflicts would be done on the git / git-server level and should not be too difficult...? AFAIK for changes on an existing note only the file of the note itself changes?

Of course, git integration would be awesome. Indicating, by colors etc., which notes have changed, are new, etc. Diffing, staging, committing would not even be necessary from within Joplin (but very welcome as well, of course). But even getting the info on the status of each file would require Joplin to invoke system-installed git, would it? Or could isomorphic-git help? Don't know Joplin's general architecture at all, but if it can sync with a local folder, it should also be able to run some git commands on that folder...?

@asprionj

AFAIK for changes on an existing note only the file of the note itself changes?

the sync target notes contain metadata (date etc.) So that will potentially be updated when you edit a note.

I'm not sure exactly what you're asking in the second part. But I can give you some info that might help. Joplin implements it's own sync and revision system, this works by assuming a stable folder either on a local system or remotely accessible via API (e.g.webdav). This does not immediately conflict with syncing to a got client because that basic assumption is still met. However the current Joplin sync code does not exactly resemble the git architecture and to try to force it to behave as a got client is probably out of scope.

You can however do as you suggest and manually manage syncing and versioning of the sync files with git because they are basically plain text (unless you use e2ee). Having plugins is on the Joplin roadmap so in the future it will likely be possible to have specialized sync hooks.

There is a project that does Git syncing already for Android, GitJournal

I've just been having issues with it not crashing when my BT keyboard disconnects from my tablet. The GitJournal can create a repository on GitHub, create a deployment key, and then let you start syncing work. Then I can use those markdown documents on my local machine if I wanted.

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexanderadam picture alexanderadam  Â·  3Comments

laurent22 picture laurent22  Â·  3Comments

okoetter picture okoetter  Â·  3Comments

yschutz picture yschutz  Â·  3Comments

LifeIsAParadox picture LifeIsAParadox  Â·  3Comments