Vinzent03 / obsidian-git

Integrate Git version control with automatic backup and other advanced features in Obsidian.md
MIT License
6.79k stars 290 forks source link

[Feature]: git-lfs support on mobile version #608

Open antailyaqwer opened 1 year ago

antailyaqwer commented 1 year ago

Thanks for your great library! I can see that on pc your plugin supports git-lfs plugin to manage large files.

But isomorphic-git doesn't support this plugin out of the box (issue).

Is there an opportunity to support this feature with some sort of workaround? I'm not a js-dev, so I can't see what kind a difficulties you may face. But for example, there are some android applications and libraries made on top of isomorphic-git itself, which somehow handle this git extension to make everything works.

I hope there is a way to add this functionality to your plugin.

GollyTicker commented 1 year ago

Are you on android or iOS?

I'm actually using termux on Android and have a foldere with a bunch of scripts to make sure, that git LFS works.

I had to use this, as isomorphic-git indeed doesn't support Git LFS.

If you want, I can share these scripts.

The nasty part was, that even on termux, the git-lfs hooks don't work because of some weird reeson which I don't understand. Instead, I had to manually invoke the git-lfs hooks on my mobile scripts 😅

i8degrees commented 1 year ago

Hi, @GollyTicker, could you please share your scripts? I am trying to setup Obsidian on Android and I, too, use Termux. I am running into headaches with my notes repository due to the fact that I have git-lfs enabled on the repository.

Thanks

antailyaqwer commented 1 year ago

Sorry, @GollyTicker, I must have missed your reply! Yeah, your scripts would be quite useful, thank you! Though I use obsidian both on android and ios devices, so, adapting git-lfs on ios still required :)

GollyTicker commented 1 year ago

cool!

I'll need to adapt my script for public usage and add docs. I'll do that around the end of this week ideally

GollyTicker commented 12 months ago

@i8degrees @antailyaqwer

Here you go!

https://github.com/GollyTicker/git-sync-template

I hope the documentation and comment are sufficient to get it working on your side.

i8degrees commented 12 months ago

Thank you @GollyTicker for the quick response! I will let you know how it goes here when I get to integrating it into my system.

antailyaqwer commented 12 months ago

@GollyTicker Many thanks for your repository!

GollyTicker commented 12 months ago

@i8degrees @antailyaqwer

So, is it working for you?

antailyaqwer commented 12 months ago

@GollyTicker Sorry about that, now I don't have time to check with your script :( I will respond as soon as will have time for it, but still many thanks for your repository!

GollyTicker commented 7 months ago

@antailyaqwer ping 😇

EDLLT commented 2 weeks ago

The solution for this on Android is simple Simply modify the Obsidian plugin to use Termux's git and git lfs instead. If someone's really interested in doing this then hmu, it should be simple

noor-tg commented 2 days ago

@EDLLT how to make obsidian use termux git ?

EDLLT commented 6 hours ago

@EDLLT how to make obsidian use termux git ?

Using Automate + Termux

EDLLT commented 6 hours ago

Obsidian Termux Git Auto-Sync.zip Note: This is NOT a zip file(It is an automate flow), rename the extension to .flo (Had to change it to .zip because github won't allow me to upload it)

The Automate flow also needs this script to be executeed https://pastebin.com/zRUrs536

Place it where the automate flow expects to find it

Finally, install termux tasker then in termux enable the functionality to execute scripts from arbitrary paths OR place the script inside the tasker directory then modify the flow to accommodate for that

edit: it was heavily inspired by this https://meganesulli.com/blog/sync-obsidian-vault-iphone-ipad/ I'd recommend reading it as it'll allow you to understand my solution above