DEV Community

Dan
Dan

Posted on

Using Git on iOS (the free way)

Using Git on iOS

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)

Okay but is it really useable for git??

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 ~/ is /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.

Edit: heres a screenshot on ipad
git on ios

Top comments (2)

Collapse
 
johnson_cor profile image
Corey Johnson

Oooh interesting, I hope this is a turning point for iOS. I remember I wanted to get an iPad Pro as a laptop replacement and was disappointed I couldn't do any substantial coding, maybe sometime in the future that'll be possible.

Collapse
 
cookrdan profile image
Dan

Yeah I would say it’s not necessarily easy regardless. A few years back I got into Python on iPad. There’s an incredible app called Pythonista. Itwould certainly be fine for producing command line tools and etc and with the UI module for iOS it was trivial to build UI applications. Those could later be made into iOS apps with a Python kit (with Xcode on Mac).

I haven’t really experimented with other coding apps because they usually cost money. There are some people that use iPad exclusively and an app called Working Copy to deal with git and remote repos. It’s a paid app and I tried it before- but I found using git with that UI was hard (you could say I prefer command line git). So I had to try with iShell. I don’t know if I will use it or not though!