Ubuntu – How should I install Git on Ubuntu Touch

aquarisbqgitsoftware installationubuntu-touch

I've got a nice little BQ Aquaris E4.5 Ubuntu Edition here and I'm trying it out. Is there a sensible way to install Git on it? It doesn't appear to be available via the default repositories.

Best Answer

Easiest way I found so far is to just download the armhf build of git from launchpad, extract it on my desktop and copy the contents to my phone. Then I can just run the git binary from where I have it copied to.

The latest armhf builds for git can be found here:

https://launchpad.net/ubuntu/utopic/armhf/git/

Download the deb of one of the builds and extract it (either with file-roller or with dpkg -x). After you extracted the deb, you'll have, among others, a usr/ dir which should contain everything you need to run git.

Upload that dir to your phone, so that its in your home, then just run

/home/phablet/usr/bin/git

and it should work. It'll complain about not finding templates when you do git init, but you can run it with

env GIT_TEMPLATE_DIR=/home/phablet/usr/share/git-core/templates /home/phablet/usr/bin/git init

to fix that problem.

If you don't want to type the full path every time you want to run git, you can set an alias in your .bashrc:

alias git=/home/phablet/usr/bin/git
Related Question