How to install GIT 2.17 on Ubuntu 17.04
To install GIT 2.17 on Ubuntu 17.04
Git is a modern version control system. It tracks all the software at the source level. With the help of Git, you can track changes, revert it back to the previous stages, and create alternate files and directories. it is so simple to install Git on Ubuntu 17.04, and this tutorial covers the ground on the same method.
Installing GIT
First, make sure you update the packages before proceeding with the installation. You shall make use of the following command for the same purpose.
root@linuxhelp:~# apt-get update
Hit:1 http://old-releases.ubuntu.com/ubuntu zesty InRelease
Hit:2 http://old-releases.ubuntu.com/ubuntu zesty-updates InRelease
Hit:3 http://old-releases.ubuntu.com/ubuntu zesty-security InRelease
Reading package lists... Done
And once it is done, you shall install the dependency packages with the help of the following command.
root@linuxhelp:~# apt-get install build-essential libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.1ubuntu2).
build-essential set to manually installed.
gettext is already the newest version (0.19.8.1-1ubuntu2).
gettext set to manually installed.
unzip is already the newest version (6.0-20ubuntu1).
.
.
rocessing triggers for man-db (2.7.6.1-2) ...
Setting up libssl-doc (1.0.2g-1ubuntu11.4) ...
Setting up libcurl4-gnutls-dev:amd64 (7.52.1-4ubuntu1.4) ...
Setting up zlib1g-dev:amd64 (1:1.2.11.dfsg-0ubuntu1) ...
Setting up libssl-dev:amd64 (1.0.2g-1ubuntu11.4) ...
After that, you shall download the source package of git by using the wget command.
root@linuxhelp:~# wget https://github.com/git/git/archive/v2.17.0.zip
--2018-04-09 17:36:49-- https://github.com/git/git/archive/v2.17.0.zip
Resolving github.com (github.com)... 192.30.253.113, 192.30.253.112
Connecting to github.com (github.com)|192.30.253.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/git/git/zip/v2.17.0 [following]
--2018-04-09 17:36:50-- https://codeload.github.com/git/git/zip/v2.17.0
Resolving codeload.github.com (codeload.github.com)... 192.30.253.120, 192.30.253.121
.
.
v2.17.0.zip [ < => ] 8.32M 749KB/s in 11s
2018-04-09 17:37:03 (777 KB/s) - ‘ v2.17.0.zip’ saved [8727550]
You need to Unzip the downloaded file using the unzip command.
root@linuxhelp:~# unzip v2.17.0.zip
Archive: v2.17.0.zip
468165c1d8a442994a825f3684528361727cd8c0
creating: git-2.17.0/
inflating: git-2.17.0/.clang-format
inflating: git-2.17.0/.gitattributes
creating: git-2.17.0/.github/
inflating: git-2.17.0/.github/CONTRIBUTING.md
inflating: git-2.17.0/.github/PULL_REQUEST_TEMPLATE.md
inflating: git-2.17.0/.gitignore
inflating: git-2.17.0/.gitmodules
inflating: git-2.17.0/.mailmap
.
.
inflating: git-2.17.0/xdiff/xmerge.c
inflating: git-2.17.0/xdiff/xpatience.c
inflating: git-2.17.0/xdiff/xprepare.c
inflating: git-2.17.0/xdiff/xprepare.h
inflating: git-2.17.0/xdiff/xtypes.h
inflating: git-2.17.0/xdiff/xutils.c
inflating: git-2.17.0/xdiff/xutils.h
inflating: git-2.17.0/zlib.c
finishing deferred symbolic links:
git-2.17.0/RelNotes -> Documentation/RelNotes/2.17.0.txt
And then you make sure you install these packages by making use of the following commands.
root@linuxhelp:~/git-2.17.0# make prefix=/usr/local all
GIT_VERSION = 2.17.0
* new build flags
CC credential-store.o
* new link flags
CC common-main.o
CC abspath.o
CC advice.o
CC alias.o
.
.
GEN bin-wrappers/test-string-list
GEN bin-wrappers/test-submodule-config
GEN bin-wrappers/test-subprocess
GEN bin-wrappers/test-svn-fe
GEN bin-wrappers/test-urlmatch-normalization
GEN bin-wrappers/test-wildmatch
GEN git-remote-testgit
root@linuxhelp:~/git-2.17.0# make prefix=/usr/local install
SUBDIR git-gui
SUBDIR gitk-git
SUBDIR templates
install -d -m 755 ' /usr/local/bin'
install -d -m 755 ' /usr/local/libexec/git-core'
install git-credential-store git-daemon git-fast-import git-http-backend git-imap-send git-sh-i18n--envsubst git-shell git-show-index git-upload-pack git-remote-testsvn git-http-fetch git-http-push git-credential-cache git-credential-cache--daemon git-remote-http git-remote-https git-remote-ftp git-remote-ftps git-bisect git-difftool--helper git-filter-branch git-merge-octopus git-m
.
.
rm -f " $execdir/$p" & &
test -z " " & &
ln " $execdir/git-remote-http" " $execdir/$p" 2> /dev/null ||
ln -s " git-remote-http" " $execdir/$p" 2> /dev/null ||
cp " $execdir/git-remote-http" " $execdir/$p" || exit
done & &
./check_bindir " z$bindir" " z$execdir" " $bindir/git-add"
After that, you shall set up the username and email.
root@linuxhelp:~# git config --global user.name " linuxhelp1"
root@linuxhelp:~# git config --global user.email user@linuxhelp1.com
root@linuxhelp:~# git config --list
user.name=linuxhelp1
user.email=user@linuxhelp1.com
Git has been installed now. With this, the tutorial comes to an end.
Comments ( 0 )
No comments available