David1256
Posts: 11
Joined: Sun Feb 15, 2015 8:00 pm

Git 1.9+ install

Sat Mar 07, 2015 6:21 pm

Hello,

I have got RPi2 and I need to install Git at least in version 1.9. Git is pre-installed on RPi but only in version 1.7 . So I have tried to update it by:

Code: Select all

sudo apt-get update
sudo apt-get install git-core
But terminal says me this:
git-core is already the newest version.

Have you got someone any idea how to upgrade git-core to version 1.9 or higher from default 1.7?

Thank you.

User avatar
Douglas6
Posts: 5110
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Git 1.9+ install

Sat Mar 07, 2015 7:17 pm

You can build from source

Code: Select all

sudo apt-get install gettext
wget https://www.kernel.org/pub/software/scm/git/git-2.3.0.tar.xz
tar -xvf git-2.3.0.tar.xz
cd git-2.3.0/
./configure --prefix=/usr --with-gitconfig=/etc/gitconfig
make
sudo make install
git --version
git version 2.3.0

User avatar
ioha
Posts: 106
Joined: Tue Feb 24, 2015 10:39 am
Location: Earth

Re: Git 1.9+ install

Sat Mar 07, 2015 7:22 pm

hm, you could take a version from their git (see Douglas6's post):
https://github.com/git/git/releases

perhaps it is also possible to use debian's wheezy-backports because there is version 1.9.1 currently available:
sudo nano /etc/apt/sources.list.d/wheezy-backports.list

then put in there:
deb http://http.debian.net/debian wheezy-backports main

then execute and install git-core:
sudo apt-get update
sudo apt-get -t squeeze-backports install git-core

see also: http://backports.debian.org/Instructions/
Raspberry Pi 1 Model B+ (since 2014-08-10): Raspbian jessie / Debian 8.1
Raspberry Pi 2 Model B (since 2015-03-10): OpenELEC 5.0.8

David1256
Posts: 11
Joined: Sun Feb 15, 2015 8:00 pm

Re: Git 1.9+ install

Sat Mar 07, 2015 7:59 pm

Thank you both very much. I have used the first variant and it works now perfectly...

User avatar
ioha
Posts: 106
Joined: Tue Feb 24, 2015 10:39 am
Location: Earth

Re: Git 1.9+ install

Sat Mar 07, 2015 9:06 pm

i could not find a repostory for git itself - e.g. like for owncloud, nginx.
so now you must upgrade to newer, bugfixed versions yourself, if needed.
Raspberry Pi 1 Model B+ (since 2014-08-10): Raspbian jessie / Debian 8.1
Raspberry Pi 2 Model B (since 2015-03-10): OpenELEC 5.0.8

mikaelv
Posts: 1
Joined: Thu May 07, 2015 12:07 pm

Re: Git 1.9+ install

Thu May 07, 2015 12:11 pm

I have compiled according to the answer at:
http://superuser.com/questions/644586/h ... n-debian-7

I'm working on getting it up on a PPA but in the meantime you can get the .deb files from:
https://bitbucket.org/mikaelv/debs/

apt-get remove the packages you want to update, then do dpkg -i <deb file>

Return to “Troubleshooting”