Readit News logoReadit News
superb-owl · 3 years ago
I'd love to see "sync with git" become a standard app feature.

Too many app developers realize they need some kind of shared state "in the cloud" and end up with a database and a backend server. Many of them would be better off if they had a reliable way to push the state management to a user-controlled space, like a git repo or Dropbox

vhanda · 3 years ago
A few things are lacking.

1. Decent desktop apps to sync the data, not everyone is comfortable hacking a Cron script. I've started with that - https://GitHub.com/GitJournal/git-auto-sync - but it's in the early stages.

2. For mobile apps, a way to drastically reduce the overhead. Cross compiling libgit2 + deps + NDK is a major pain, and jGit uses more modern java features so you need to target a higher version of Android. (This was in early 2019, when I first started GitJournal)

3. There is no competing with a simple http call vs the complexity of git. Plus the entire onboarding process.

4. Many many apps do write to Dropbox or Google Drive, but for me that's not a win as you aren't in control of your data.

5. While hosting your own git server is arguably easier than self hosting anything else, the majority of users in GitJournal (more than 80% use GitHub, this was about a year ago.) There is also a bias as people who self host are more likely to switch off the analytics. I don't send any message when analytics are switched off, so I don't know.

6. We need end-to-end encryption in Git, like keybase was providing, but open source and hostable in any git repo. I started a proof of concept of a custom remote where I just write all the git objects to another git repo, but haven't gotten very far.

Disclaimer: I'm the author of GitJournal.

nindalf · 3 years ago
Hi Vishesh, I installed the app on ios just now and tried to connect my repo on GitHub. It failed with the error - MissingPluginException (No implementation found for method gitClone on channel gitjournal.io/git)

I’ve requested a refund. But please don’t take that as discouragement. I want this workflow (editing markdown notes synced to git) very much. I’ve tried various ways to hack it, like connecting 1Writer (editor) to Working Copy (git client). Although both apps are very slick, the integration is not.

Editor apps are also reluctant to provide git integration for the reasons you listed, plus it will reduce future revenue from a hosted solution they could offer. I’m not too optimistic that there will be many apps in this space. That’s good news for you!

Best of luck!

chrismorgan · 3 years ago
Even when 80% use one platform, the fact that you can very easily switch between platforms (commercial or self-hosted) is of significant value—vendor lock-in is completely eliminated.
spicybright · 3 years ago
What's your opinion on SyncThing?

I find this checks a ton of these boxes for me, and I find it really easy to get non-techies on board and actually be comfortable using it.

kamalkishor1991 · 3 years ago
These are great points: I also feel that one other big problem with notes is organizing them properly as number of notes increase. Since git has history for all your changes you can easily delete anything that is not important right now. I am building a side project exactally to solve this problem. It has auto sync also. The plan is to add search functionality that can search accorss the history of all the notes. https://upnotes.io

Also in upnotes we are using your local git command and I am planning to add encryption with your public key for few subfolders.

gbraad · 3 years ago
Create a note by pressing plus, select share and click OK. Now you got two notes in the app that are copies.

The first few minutes are the most important for an application. It should not fail and do as advertised. So far, this feels not fully tested or even UI tested. This would not lead to an easy upgrade to 'Pro'.

Note: removed statement about not intuitive of Git syncing. This is hidden in the hamburger menu instead of being part of the initial view and options.

nl · 3 years ago
My company does a E2E encrypted database sync service (based on CouchDB), with everything operating over HTTPS.

If you want structured data it's pretty good IMHO. Take a look: https://developers.verida.io/docs/tutorial/databases

remram · 3 years ago
The Git model is to version everything together. This means that a conflict blocks the entire repo until it's fixed.

In many situations, it's better to version separate pages/items/notes separately, and have a conflict to a single note leave the rest of your repo working and syncing.

YetAnotherNick · 3 years ago
Separate git repo for each note will fix this, right? Another possibility you can use some trick like https://stackoverflow.com/a/64810110/936584 to prefer one version.
gernb · 3 years ago
sync to git isn't perfect. I use Google Keep, which, like docs, I can have the same document open on multiple machines, start editing on one, finished editing on the other, no "commit/push/fetch/rebase/merge" cycle required.

The typical scenario for me is start typing something in and then get interrupted (notification, time based appointment, someone needing my attention), when I get back to entering I might be at a different machine (like started on my phone, got interrupted, then sitting at my computer and remember to finish).

I don't see how git sync helps this issue.

oneeyedpigeon · 3 years ago
I don't think the OP was suggesting exposing all those low-level details in the UI. Surely the software would do all of that for you?
enasterosophes · 3 years ago
The Git protocol is free, and projects like libgit2 make it easy to integrate the protocol into new software.

If you feel strongly about it, please consider contacting the purveyors of your favorite software and ask why they don't have Git integration.

(Edit: libgit2, not libgit.)

Deleted Comment

dotancohen · 3 years ago
Git stores the entire history of text files. Very few apps need the history feature. Leaving the feature in place may take much disk space, and actually removing files no longer needed is a pain in git, git is not designed for that use case.

I do agree that a standardized sync protocol and file format that could be pointed at any arbitrary server would be terrific. I just disagree that git is that format for many use cases.

prepend · 3 years ago
As a note taker, I’d much rather have the history and deal with the disk space than lose the history and have extra storage.

I almost never truly want to delete any note. And most changes are additive so don’t take much extra storage due to versioning.

I find it maddening to use a note app that doesn’t have detailed change logs and git’s history and blame is really useful.

vendiddy · 3 years ago
For text based notes, the storage cost is negligible.

I've been using a single git repo to store notes for years. And my entire repo is a few MB.

codethief · 3 years ago
To be honest I'd rather love to see "select folder for storage" become a standard app feature. Then I could just use whatever app I want to synchronize the files (in my case probably Syncthing). Integration of $APP_FEATURES and $SYNC_BACKENDS in apps is a major waste of developer resources and it also means that, as a user, I can never freely choose the app based upon its intrinsic features but also always have to keep synchronization in mind.
mrtesthah · 3 years ago
The iOS editor Runestone takes this approach. I’ve installed Möbius Sync on the device, with both apps pointing at the same folder to create a syncthing conduit with my Mac.

It’s fully seamless, private, and free.

pydry · 3 years ago
I wish we just had save to textual flat file as a more common standard app feature (which is simple/easy) and a plethora of separate apps that did the syncing from that (hard - conflicts/authentication, but only needs to be done once for all apps).

I have the git syncing tools but most apps dont save to flat file and the ones that do tend to require hitting export -> backup.

dominotw · 3 years ago
> Too many app developers realize they need some kind of shared state "in the cloud" and end up with a database and a backend server.

This is usually the premium offering( eg: obsidian) in their product.

ChadNauseam · 3 years ago
That’s a great idea. Although key management might be a problem. Also, you might have conflicts if you try to push from one device after having previously pushed from another device.
hoherd · 3 years ago
Conflicts aren't specific to git. Git offers a history of those conflict resolutions though, which lets you correct them if they were not done right.

I used to store my DayOne journal in git, and boy, their cloud sync conflict resolution was sometimes quite destructive. Having the git history showed me that, and allowed me to correct it.

vhanda · 3 years ago
Hello people of HN. I'm the author, and didn't expect this to get posted here as I introduced a bug in the iOS version where cloning a repo might fail if it doesn't have a single note.

Sorry about that. A bugfix version will hopefully be soon available.

I'm happy to answer any questions.

Loeffelmann · 3 years ago
Hi I am interested in how the git functionality works. How do you let the users deal with potential merge conflicts? How often do you commit and push? With every character that is typed or after the document is closed? Are branches used at all or do you stay on one main branch?
vhanda · 3 years ago
- I just use the local version always and don't deal with any of the conflicts. It is however in the top 10 issues to fix.

Since the history is still preserved, no data is lost.

- I commit and pull + push each time a note is modified / created / deleted. And whenever you pull to refresh or tap the sync button. Optionally, this can be disabled, and it will only pull+push when you press the button.

- I only stay on the main branch, the user has an option to switch branches. I have no plans and no requests / use-cases for doing anything more with branches.

schaefer · 3 years ago
I see links for twitter, Mastodon, and a newsletters... Dare I ask, do you have an RSS feed for blog posts?
vhanda · 3 years ago
Nope. But good catch, I'll add it to my todo list.

The website is built with Hugo [0], so it should be easy enough.

[0] https://gohugo.io/

0des · 3 years ago
Really cool product, thanks for your hard work :) What's the best way we can support you?
vhanda · 3 years ago
Either purchasing the pro version, or GitHub Sponsors please - https://Github.com/vhanda

Otherwise, feedback about GitJournal is also greatly appreciated.

jarbus · 3 years ago
How’s the stability? There are a few reviews citing bugs and inability to restore purchases. I’d just try it myself if it didn’t cost $$ on iOS
vhanda · 3 years ago
There have been bugs (still unresolved) about restoring purchases, in each case, the users have written to me, and I've immediately provided them coupons or a workaround.

Regarding stability, there sadly are some crashes on ios which I haven't managed to figure out at all. I'm planning a big move next week where I bump the version of libgit2, since I'm lagging behind by almost 1.5 years now, and I want to make it a regular occurrence. I'm hoping that will help with the stability.

sAbakumoff · 3 years ago
Did you intentionally copy Google Keep design?
vhanda · 3 years ago
Yup. Though the UI is pretty customizable.

My initial (and even now) aim with GitJournal was to satisfy 2 of my needs - A good journalling app where I have control of my data. I used to use Journey [0], but they kept adding more and more cruft, and having to export my data + relying on Google wasn't something I liked. The other is Google Keep. I still have a long way to go to get their level of usability though. Things just feel so much nicer in Google Keep.

Now, since I've been using Obsidian more, I'm starting to incorporate more features from it. So UI is a mix of all 3.

I just noticed that the screenshot carousel in the website is broken.

- [0] https://journey.cloud/

Deleted Comment

echelon · 3 years ago
Obsidian, despite not being open source, has been my favorite cross-platform, organizable Markdown editor. It's easily synchronized with git, which gives it so much potential.

The next biggest wish I have is for inclusion and management of binary files. Photos, videos, etc. It'd be nice for them to not be in the git repo, but to still be distributed, addressable, annotatable, and with some kind of cross-platform UI (Linux, Windows, Mobile, Web).

Even better if it's easy to automate workflows to publish to a public personal wiki / blog / website.

trickjarrett · 3 years ago
I don't know why I never considered using git for syncing it. I currently just use some scripts to sync to the server on laptop and on my phone.
infogulch · 3 years ago
I wonder if it would be reasonable to use git LFS for these kinds of binary files. Would that work with GitJournal? I've heard stories that git LFS is 'bad' somehow, but I'm not familiar with why and I wonder how applicable those issues would be to this kind of use-case.
vhanda · 3 years ago
GitJournal doesn't yet support LFS, and since neither libgit2 or go-git supports it, it's unlikely that I'll implement it. (last I checked it wasn't supported, maybe things have changed).

I do, however, want to support partial clones and easier tools to cleanup the history and reduce the repo size.

hda111 · 3 years ago
I personally wouldn’t put “easy” and “git” in one sentence. To sync it’s too much typing requires and possible conflicts need to be resolved.
Barrin92 · 3 years ago
Another good open source, markdown based alternative that I used for a long time is Joplin. Also has git sync built in and is cross platform.

https://joplinapp.org/

schaefer · 3 years ago
Interestingly, GitJournal has an import function from Joplin.

[1]: https://gitjournal.io/docs/import/joplin/

encryptluks2 · 3 years ago
Import your free notes that work just as well into our paid app with the same or less features.
saxelsen · 3 years ago
I'm a fairly happy user of Joplin - it's great if you want a synchronised cross-device markdown editor!

I write "fairly happy", because there is a longstanding issue with the Android app where notes that have more than 10 lines start to experience crazy lag when editing. So I mainly use the desktop version for writing.

Wish they would fix the Android bug!

meribold · 3 years ago
I just installed the iOS app and as far as I can tell there's no option to sync using Git.
prepend · 3 years ago
Same here, I see Dropbox, OneDrive, Joplin cloud, webdev, s3, nextcloud, Joplin server but no git.

The app seems nice but I think git history and durability is a good feature.

smcleod · 3 years ago
Unfortunately the desktop "app" for Joplin is Electron.
lf-non · 3 years ago
There is also a terminal application if you don't like electron https://joplinapp.org/terminal/
jpatters · 3 years ago
I bought this for iOS a couple years ago and was happily using it until some of the features got moved behind a pay wall. To have an app that I paid money for suddenly start charging for features that I already bought was super annoying. Hopefully they have rethought that move by now but it was enough to turn me off of it.
vhanda · 3 years ago
Hi. I'm the author. I never moved any features behind a paywall. Only new features are paid.

Also, the entire source code (pro features as well) are completely open source.

Regardless, I'm not happy that you feel cheated. Is there someway to ask Apple for a refund?

jpatters · 3 years ago
Thanks for the response. Maybe I’m remembering the features being moved incorrectly. Regardless, I did feel cheated because I had just paid money for the app and now it was asking me to pay more money for what I thought I had just bought. I didn’t realize this was open source (maybe it wasn’t 2 years ago?). Also, it was 2 years ago. There’s no way to get a refund from apple. I’ll be honest, I just wanted to caution people so that they knew it had to be paid for twice. However, I see that it is now free from the App Store with an in app pay to upgrade. That’s definitely better than the experience that I had. So good job changing that.

Edit: it isn’t free on the apple app store. I failed to realize that I t shows as free for me because I already purchased it of course.

kragen · 3 years ago
Presumably you can compile the old version from source and install the version you compiled, right? Or was it not yet licensed under the AGPL?
herdst · 3 years ago
I read your 'About me' section, and how you are a privacy enthusiast.

How does this hold up with storing notes in Git (which usually means syncing to github etc.)? I mean of course you can self-host to keep your notes privately, but does this support encrypted notes? I imagine git history works poorly if notes are encrypted.

vhanda · 3 years ago
If you don't self host, you have a very marginal improvement of privacy. The main benefit would be eliminating vendor lockin.

I'm working on an end-to-end encrypted git solution, but it's still in the prototype phase.

hkt · 3 years ago
For encrypted secrets in git I'd suggest looking at sops and password store:

https://github.com/mozilla/sops

https://github.com/android-password-store/Android-Password-S...

Both are extremely useful secrets oriented git tools with support for things like PGP encryption. Both will encrypt with multiple keys too, making sharing relatively easy. The android pass app even manages SSH keys for pushing and pulling. There may be good inspiration in those repos, or even code you can borrow.

Also, thanks so much for making this: it is elegant and lovely. Keep it up!

ls15 · 3 years ago
So here's my little script that automatically commits the content directory to git on changes:

    interval_in_seconds=0.5
    previous=""
    while true; 
    do 
        x=$(ls -R -al ./content | md5); 
        if [[ "$x" != "$previous" ]]; then
            previous=$x
            git add *
            git commit -m "Content update"
            # ...
        fi; 
        sleep $interval_in_seconds; 
    done
Of course it lacks a lot of the functionality that GitJournal has. It is just meant to keep a history of changes.

vhanda · 3 years ago
I started https://GitHub.com/GitJournal/git-auto-sync to do this exact thing. Just with an easier interface and proper tests.

You can basically call `git-auto-sync daemon add`, and it will register itself as a systemd user process (on Linux, other OSs are also supported), and monitor that folder for changes + poll every x minutes.

It's still in the early stages, but I'd love to get your feedback.

Edit: Or you can just call `git-auto-sync sync` to commit + pull / rebase + push.

john-tells-all · 3 years ago
Consider updating your script to use Entr. It's specifically designed to efficiently and rapidly run code on file changes.

More info from National Treasure Julia Evans: https://jvns.ca/blog/2020/06/28/entr/

Something like this:

    git ls-files | entr autocommit.sh

pydry · 3 years ago
I have something very similar to this with keybase e2e encrypted git and just triggered by a big button (on laptop/phone).
kevinslin · 3 years ago
happy customer of gitjournal. also creator of a git backed open source note taking tool. we don't have a dedicated mobile app (yet) and recommend folks use gitjournal > https://blog.dendron.so/notes/fDCVPEo3guCFWPdxokXHU#gitjourn...
cookieswumchorr · 3 years ago
are the two apps compatible to use simultaneously with the same notebook?
kevinslin · 3 years ago
yep