How to Install Git on Debian 12, 11, or 10

Git is the most widely used version control system for developers and system administrators. On Debian-based systems like Debian 12 (Bookworm), Debian 11 (Bullseye), and Debian 10 (Buster), installing Git is straightforward and requires only a few steps

Step 1: Update the System Packages

Before installing Git, update the package index to ensure you are installing the latest version available in Debian’s repositories:

sudo apt update
sudo apt upgrade -y

Step 2: Install Git

Use the default Debian repositories to install Git. This works for Debian 12, 11, and 10:

sudo apt install git -y

Verify the installation with:

git --version

This command will display the installed Git version.

Step 3: Configure Git User Information

Git requires user details for commits. Configure your name and email address globally on your system:

git config --global user.name "Your Name"
git config --global user.email "[email protected]"

You can confirm your configuration with:

git config --list

Step 4: Test Git Installation

To confirm that Git is working properly, create a new directory and initialize a repository:

mkdir test-git
cd test-git
git init

If you see the message “Initialized empty Git repository”, Git is successfully installed and ready to use.

Share:

More Posts

How to Install Maven on macOS 2025

What you will read?1 Check for Java Installation2 Install Homebrew (If Not Installed)3 Install Maven via Homebrew4 Verify Environment Variables (Optional)5 Create a Sample Maven

How to Use Google SMTP Server

What you will read?1 Step 1: Enable SMTP Access in Gmail2 Step 2: Secure Connection with TLS3 Step 3: Send an Email via SMTP4 Step

how to install wine on RHEL

What you will read?1 Check RHEL version and CPU architecture2 Update system and install base tools3 Verify subscription and enable CodeReady Builder4 Enable EPEL repository5

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments