How to Install Git On Debian 11.4
To Install Git On Debian 11.4
Introduction:
Git is an open-source software program for tracking changes and storing content which is a prominent version control system that handles numerous codes by maintaining the history and also possesses a remote repository. This is to provide speed and integrity to the data.
Installation procedure:
Step 1: Check the OS version by using the below command
root@debian:~# lsb_release -aNo LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
Step 2: Install the Git by using the below command
root@debian:~# apt install git -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
dbconfig-common dbconfig-mysql default-mysql-client galera-4
icc-profiles-free libaio1 libcgi-fast-perl libcgi-pm-perl
libconfig-inifiles-perl libdbd-mariadb-perl libdbi-perl libfcgi-bin
libfcgi-perl libfcgi0ldbl libhtml-template-perl libjs-bootstrap4
libjs-codemirror libjs-jquery libjs-jquery-mousewheel
libjs-jquery-timepicker libjs-jquery-ui libjs-openlayers libjs-popper.js
libjs-sizzle libjs-sphinxdoc libjs-underscore libmariadb3 libonig5
libopengl0 libterm-readkey-perl libzip4 mariadb-client-10.5
mariadb-client-core-10.5 mariadb-common mariadb-server-10.5
mariadb-server-core-10.5 mysql-common node-jquery rsync socat
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
git-man liberror-perl patch
Suggested packages:
git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk
gitweb git-cvs git-mediawiki git-svn ed diffutils-doc
The following NEW packages will be installed:
git git-man liberror-perl patch
0 upgraded, 4 newly installed, 0 to remove and 26 not upgraded.
Need to get 7,505 kB of archives.
After this operation, 38.2 MB of additional disk space will be used.
Get:1 http://security.debian.org/debian-security bullseye-security/main amd64 git-man all 1:2.30.2-1+deb11u2 [1,828 kB]
Get:2 http://deb.debian.org/debian bullseye/main amd64 liberror-perl all 0.17029-1 [31.0 kB]
Get:3 http://deb.debian.org/debian bullseye/main amd64 patch amd64 2.7.6-7 [128 kB]
Get:4 http://security.debian.org/debian-security bullseye-security/main amd64 git amd64 1:2.30.2-1+deb11u2 [5,518 kB]
Fetched 7,505 kB in 1s (5,759 kB/s)
Selecting previously unselected package liberror-perl.
(Reading database ... 146878 files and directories currently installed.)
Preparing to unpack .../liberror-perl_0.17029-1_all.deb ...
Unpacking liberror-perl (0.17029-1) ...
Selecting previously unselected package git-man.
Preparing to unpack .../git-man_1%3a2.30.2-1+deb11u2_all.deb ...
Unpacking git-man (1:2.30.2-1+deb11u2) ...
Selecting previously unselected package git.
Preparing to unpack .../git_1%3a2.30.2-1+deb11u2_amd64.deb ...
Unpacking git (1:2.30.2-1+deb11u2) ...
Selecting previously unselected package patch.
Preparing to unpack .../patch_2.7.6-7_amd64.deb ...
Unpacking patch (2.7.6-7) ...
Setting up liberror-perl (0.17029-1) ...
Setting up patch (2.7.6-7) ...
Setting up git-man (1:2.30.2-1+deb11u2) ...
Setting up git (1:2.30.2-1+deb11u2) ...
Processing triggers for man-db (2.9.4-2) ...
Step 3: Check the downloaded Git version by using the below command
root@debian:~# git --version
git version 2.30.2
Step 4: Create the user name by using the below command
root@debian:~# git config --global user.name "linuxhelp"
Step 5: Create the Email ID by using the below command
root@debian:~# git config --global user.email user@linuxhelp.org
Step 6: View the create user name and email as shown in the image below
root@debian:~# vim ~/.gitconfig

Step 7: List the configuration by using the below command
root@debian:~# git config --list
user.name=linuxhelp
user.email=user@linuxhelp.org
Conclusion:
We have reached the end of this article. In this guide, we have walked you through the steps required to install Git on Debian 11.4. Your feedback is much welcome.
Comments ( 0 )
No comments available