I mention two apps- I have no affiliation...just sharing something
I recently discovered fairly new iOS app called iShell. In short it's Alpine Linux. I was excited to see this and I couldn't help myself from tinkering with it. It comes with a package manager (apk). I was able to install bash (google it) and change how the prompt looks and etc. Not everything that you would expect is in there and some things probably just don’t work (because apps have limited access to device hardware etc).
I was also curious about getting git to work. Short answer: yes, it works. The printed output for some things like
git log is a bit wonky but it does work. I haven't tried yet but it'd probably be better on iPad with the bigger screen. The version that installed with the package manager is 2.20.1.
(Edit: manually adding the less pager made the output from git that uses a pager to be normal)
Git works, but what about editing files? iShell comes with Vim and I also installed nano and set that as the editor for git. But what about using other iOS apps as an editor?
Yesterday I discovered that iShell shows up in the iOS Files app as a source. Everything on the system is accessible and the home folder
/root when you're browsing the structure. Now the interesting part is that, as you may know, those files are accessible by apps that utilize the iOS Files document picker.
So, for example, with an editor app like Kodex you can access files stored in iShell. Make edits. Then you do all your normal git commands in iShell.
On iPad, iShell supports split screen so you could have an editor on one half and iShell on the other, or slide over. You know: touch touch tap tap git.
I have not tested this thoroughly but I believe everything should work correctly. Both iShell and Kodex are free and so this is a free way to use git and remote repos on iOS.