How to use Git on Android?

I have a desktop application using git for synchronization. I have also an android application which do the same as the desktop, but I don't know how to do the synchronization part on it. I haven't found any implementation of git on android. I found a jgit, but its unwell documented and I was not able to do even a commit with that.

I was thinking about remote commands to my git server from my android app, but this is really a tease for me. Could you tell me if any other git implementation which can be used on android exists? If you have any idea how to solve that, please tell me.


Solution 1:

Since this question was first posted, an Android app has been added to the market that can checkout Git repos, called Agit. It can't commit or push yet, but the clone/fetch/pull functionality is useful. The other issue is that a patched version of ConnectBot needs to be installed before Agit if you want to use SSH keys. If you already have ConnectBot, uninstall it first. I did not do this and ran into problems.

Edit: As of April 2021, the ability to push and pull has been added, however, it does seem to be very buggy as I have only been able to pull changes, but never push them.

Solution 2:

Another option is using ASE. There seems to be a full-featured pure python implementation of git at https://github.com/jelmer/dulwich.

Solution 3:

If the device is rooted, you can also use debian's debootstrap ( http://wiki.debian.org/Debootstrap ) application to create a debian/armel image, mount it in your android device and chroot to it, you have aptitude here so any package available for armel can be installed on your device (to install git: aptitude install git). Look here for information on how to install debian for your android: http://lanrat.com/install-debian-on-android/