[Mobile] Automatic sync with GitHub on iOS (for free) via a-shell

Thanks for a great tutorial.

I have had to put in my own 2-3 weeks worth of learning about Git.

A couple of remarks to your post, if I may:

An lg2 pull is always a good idea and a good habit to have before add + commit + push as any merges must happen locally rather than on the host.

The command lg2 add . was a welcome introduction because it will handle adding all untracked files (any deletions and additions of files not yet on the repo) as well. It is superior to lg2 add -u.

With pickFolder I bookmarked my repository folder thus there is no need for the cd (change directory) command (which if I remember right, did not even work for me when run from the shortcut).

Instead of your echo command I run lg2 status to see if everything was done correctly. If you are on branch, you are good to go.

On my larger repo I need to put in the commands one by one in the A-Shell terminal and wait it all out. The cloning process has no problems though. There is no memory or timeout issues, fortunately.
In case I might have any issues, I have set up an automated zip archive shortcut that copies the zips to my iCloud folder (from its browser website only compressed files can be downloaded in a batch, not folders, hence the idea).
(For me, the reason to leave iCloud for Git was not handling the myriad small files correctly [as I need to edit them with Notepad++ from time to time], but larger files are uploaded instantly, though.)

On my smaller repo, the Obsidian Git plugin runs smoothly (on iPad as well). As discussed elsewhere, there one needs to use the https protocol instead of git with the ssh keys.
What I do is open the config file in the .git folder in the Taio app (which sees the hidden folders that the iOS Files app doesn’t show) and edit from Taio (e.g. if I need to make any changes in the URL format or delete the superfluous keychain password).

4 Likes