• Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate
TecNStuff
Menu
  • Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate

How to Install Git on Debian 11 Linux

Written by Admin, Updated On January 7, 2023
debian, git
How to Install Git on Debian 11 Linux

Git is the most famous distributed version control system in the world. It efficiently handles changes in source code for many open source and commercial projects. It allows to collaborate with programmers, revert to previous changes and create branches. In this article, you will learn how to install Git on Debian 11 Bullseye.

Prerequisites#

You must have logged in with non-root user account with sudo privileges.

Installing Git#

By default, Debian repositories includes the Git package. You can install Git using the apt package manager. You can also install latest version of Git from source. To install from apt manager is very simpler and we will use it in this article.

sudo apt update
sudo apt install git

Once the installation completed, you can verify by checking version:

git --version
git version 2.38.1

Configure Git#

Once the installation finished, you need to configure it by setting up email address and username:

git config --global user.name "Your Name"
git config --global user.email "youremail@example.com"

Don’t forget to replace with your real name and email address.

You can check entered details by typing:

git config --list
user.name=Your Name
user.email=youremail@example.com

These settings are stored at ~/.gitconfig file and you can see content as below:

You can make other git configuration changes by using git config command or you can use text editor to make changes to ~/.gitconfig file manually.

Update Git#

When new release is available to standard Debian repositories, you can update the Git package using below command:

sudo apt update
sudo apt upgrade

Conclusion#

In this guide, we show you how to install Git on Debian 11 Bullseye. You can get more details about use of Git from Pro Git book.

If our content helps you, please consider buying us a coffee

Thank you for your support.

Share On
Share on Facebook
Share on Twitter
Share on Reddit
Share on Tumblr
 Previous Article How to Install Go on Ubuntu 22.04
Next Article   How to Install Gitea on Ubuntu 22.04

Related Posts

  • How to Install WordPress with Nginx on Debian 11

    How to Install WordPress with Nginx on Debian 11

    March 22, 2023
  • How to Install and Use Docker on Debian 11

    How to Install and Use Docker on Debian 11

    March 10, 2023
  • How to Install MariaDB on Debian 11 Bullseye

    How to Install MariaDB on Debian 11 Bullseye

    March 8, 2023

Leave a Reply Cancel reply

DigitalOcean Referral Badge

Popular Posts

  • How to Install Microsoft Edge Browser on Ubuntu 22.04
    How to Install Microsoft Edge Browser on Ubuntu 22.04 March 14, 2023
  • How to Install Ruby on Ubuntu 22.04 LTS
    How to Install Ruby on Ubuntu 22.04 LTS February 27, 2023
  • How to Install LEMP Stack on Ubuntu 22.04
    How to Install LEMP Stack on Ubuntu 22.04 March 18, 2023
  • How to Install Set Up Apache Virtual Hosts on Ubuntu 22.04
    How to Set Up Apache Virtual Hosts on Ubuntu 22.04 March 2, 2023
  • How to Install MariaDB on Debian 11 Bullseye
    How to Install MariaDB on Debian 11 Bullseye March 8, 2023
© 2020 TecNStuff All rights reserved. This website is using and storing cookies on your browser. By using this website you agree our Privacy Policy.  Follow us -  Twitter | Facebook