-
-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow git as the sync backend #267
Comments
Appreciate the detailed suggestion @NightMachinary. I definitely want to support this feature, thanks for spelling out the benefits. I’ve had discussions with the org mode maintainer about it as well and possibly even removing the dependency on the old style org-mobile.el sync method |
@dive any suggestions for a good git interaction library in swift? I haven't looked around much yet, but if you know of one that's in common use or has a nice api let me know. |
@webframp 😃👍 To illustrate, here is a screenshot of my working copy’s git folder in a file explorer app: |
@NightMachinary What exactly don't you like about "cloud" storage? Having a better picture of what the issue is makes it easier to assess the options available. |
I would love to enable users to just use a private git repo, either self hosted, GitHub or elsewhere |
I still think the best approach is to understand the problem being addressed first and then assemble solutions afterwards. I believe the current staging mechanism was developed as a simple way to manage conflict resolution when syncing. Pulling from a git repository would manage conflict, but we might need to manage a git client in the app. A direct sync doesn't really seem to handle conflicts well. |
I think I agree @gitonthescene. My interest is in simplicity where possible and enabling user choice for where they store their data. |
Maybe it would be good to walk through some scenarios/expectations.
We’ll need more engagement from users on these sorts of scenarios to know if we’ll be making the app better or worse. Unfortunately more options is often at odds with simplicity. Not that we shouldn’t strive for both. If we establish some principles it will be easier to make decisions. I propose “We must be able make edits to existing org files on the app” as a founding principle. I also propose “The app must share files with other apps” which inevitably opens up questions of synchronization. I’m completely agnostic as to how these goals are achieved, nor to I suggest this list of principles is exhaustive. |
I think there are some good ideas here FWIW: https://opensource.guide/ |
@gitonthescene I have written why I want git on my first post, plus a very easy way to add support for it using other apps. But to reiterate, git is the only sync option that gives me all the power. I can self-host it (on multiple locations), I can edit files offline, I’ll never fear for a merge conflict leading to data loss, I have my files versioned and can go back in their history if needed, I can use an SSH session to edit my notes easily, and I’ll not be worried that a cloud storage will disappear from under my feet. (Once upon a time, I backuped my photos to Flickr. Then one day I saw a spammy email saying Flickr is discontinuing their free cloud storage. If I hadn’t seen that, I’d have been in for a big treat.) I agree that simple users won’t find git support useful, but this is a FOSS app for Org mode. Simple users aren’t going to use this anyways. They have great options a dozen. On your questions of how the git support should work.
|
I don’t know Working Copy but I’ll have a poke around. To be clear, you can run your own WebDav instance pretty easily too. WebDav was designed for collaborative upload as well with file locking etc, though I don’t believe that MobileOrg takes advantage of those features. WebDav is much lighter weight than git as well and can be run over ssh. From a practical stand point, resolving merges on the phone feels like a bit of a pain. I use github a bit but have never tried doing anything substantial with it on the phone. It’s not clear to me what other choices there are for conflicts though. The current scheme shuffles these conflicts off to a staging file so as not to disturb the main files. I merge those differences on my desktop. I’m not sure how you mean “Use multiple tools simultaneously”. Do you mean if your files are backed by github you can access those files with other tools? To me that’s sort of orthogonal to how MobileOrg chooses to sync. I picture most users of the app as doing editing on the app and their desktop and most of their editing on desktop. Syncing is about keeping these two copies from diverging too far apart. What else you do with those files is up to you. You could sync to github from your desktop working copy, though you’d want to be in sync with your phone when you do that. Given that these files are generally also on your desktop, there really is no worry of losing the data (at least not more than losing any of the data on your desktop). That said, I’m not against the idea, but it feels like overkill for something meant to keep your phone in sync with your desktop. If there was a simple plugin implementation, so much the better though I still worry a bit about managing the flexibility from the phone. It would help to map out a few use cases in detail. The real rub here is conflict resolution, which makes auto pulling or pushing more suspect. Lastly, your first link was to something called TestFlight. Is that what you meant? If so, I’m not following. |
Okay, so I had a quick look at Working Copy and I think I understand your suggestion better. The idea would be to move syncing and all the merge issues that come with it outside the app. You would point at files which are shared with some other app that MobileOrg org would freely read from and write to. The only “trick” would be making sure those files are shared with the other app. This sounds pretty easy to do and worth doing. I wouldn’t want this to be the only mode in the short term since I don’t have any other examples of syncing apps like this, so in the short term this would be the vendor lock in you mentioned above. I like this a lot better than having to maintain a git client in MobileOrg and is nicer than having to maintain syncing code in MobileOrg modulo that vendor lock in. But maybe as you suggest this could be a model for other sync methods. I.e. that they be separate apps. MobileOrg could provide a trivial one for whatever sync model it settles on. Thanks for the suggestion. |
@gitonthescene Great! There are other apps though! iSH provides a partial Linux environment that can run git and rclone. ShellFish provides SFTP and some other methods. Cloud drive apps (Dropbox, Gdrive, etc) provide cloud storage. I’m looking forward to the update. :D |
It sounds like the other options wouldn’t as directly provide the support for merging conflicts during a sync, though. It helps to be clear when evaluating alternatives.
Sent from Yahoo Mail for iPhone
On Sunday, July 5, 2020, 5:23 PM, NightMachinary <[email protected]> wrote:
@gitonthescene Great! There are other apps though! iSH provides a partial Linux environment that can run git and rclone. ShellFish provides SFTP and some other methods. Cloud drive apps (Dropbox, Gdrive, etc) provide cloud storage.
I’m looking forward to the update. :D
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I'd like to up this feature |
Related: #120
I already manage my notes via git, and don’t like cloud services for syncing. Adding a git-backend sync would be very helpful.
Perhaps you can integrate with the app Working Copy for this. You can use that app’s beta for free here.
Some advantages:
ga . ; gcam “some auto generated message” ; git pull ; git push
The text was updated successfully, but these errors were encountered: