Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install git 1.8 or above on Debian Wheezy

Tags:

git

debian

I'm trying trying to install a later version of git (primarily 1.8.* or above). if I try and install it using apt-get install git I end up installing version 1.7.10.4.

I have already tried changing the repository using the method below:

add-apt-repository ppa:git-core/ppa
apt-get update
apt-get install git

The output of apt-get update just gives the me the following and because of that, I end up installing version 1.7.10.4 again.

W: Failed to fetch http://ppa.launchpad.net/git-core/ppa/ubuntu/dists/wheezy/main/source/Sources  404  Not Found
W: Failed to fetch http://ppa.launchpad.net/git-core/ppa/ubuntu/dists/wheezy/main/binary-amd64/Packages  404  Not Found

I have also tried to install git using a backport, like the following:

sudo apt-get install git/wheezy-backports
sudo apt-get -t wheezy-backports install git

I never end up getting further than apt-get install git/wheezy-backports because then I end up getting the following error:

E: Release 'wheezy-backports' for 'git' was not found

How would I install git 1.8.* or above on Debian Wheezy?

like image 516
Tarkan Avatar asked Aug 01 '14 20:08

Tarkan


People also ask

How do I get git Debian?

Debian/Ubuntu To install Git, run the following command: sudo apt-get install git-all . Once the command output has completed, you can verify the installation by typing: git version .

How do I install GitHub?

From the GitHub Apps settings page, select your app. In the left sidebar, click Install App. Click Install next to the organization or personal account containing the correct repository. Install the app on all repositories or select repositories.


2 Answers

I would definitely recommend using the backports version. To use the backports repository, keep in mind that you must add the following line to your /etc/apt/sources.list:

deb http://http.debian.net/debian wheezy-backports main

And then you can retry with apt-get. You will find full instructions at http://backports.debian.org/Instructions/#index2h2

like image 93
Gheesh Avatar answered Oct 17 '22 06:10

Gheesh


Let me provide a clean copy/paste solution:

echo "deb http://http.debian.net/debian wheezy-backports main" >/etc/apt/sources.list.d/wheezy-backports.list
sudo apt-get update -qq
sudo apt-get -t wheezy-backports install -y -qq git mercurial
like image 34
sorin Avatar answered Oct 17 '22 04:10

sorin