By installing Git on Ubuntu 24.04, you can track changes to your code, collaborate with others, and manage your projects efficiently. Git is one of the most important tools for version management in software projects.
Step 1: Which Server is Right for Your Project?
Before installing Git, you should think about server type on which your project will be hosted. Git itself is low-resource, but is often used with development environments, web projects, or automated deployments. In practice, two types of servers are generally considered: the virtual private server (VPS, Virtual Private Server) or the dedicated server.
A VPS is basically a type of virtual machine, running on a physical host system. Multiple virtual servers share the equipment of this host system, but have their own resources, such as RAM, CPU shares and storage space. For small projects, personal development environments or first experiments with Git, a VPS is sufficient in the vast majority of cases. It is easily scalable and more economical than a physical machine.
A dedicated server, on the other hand, puts at your disposal all the material exclusively. So you don’t share resources with other people. This option is particularly suitable for large development projects, teams with multiple developers, or complex applications with many repositories. When it comes to running continuous integration (CI) and continuous deployment (CD) pipelines, or demanding build and test tasks, a dedicated server also offers more performance reserves.
Virtual servers (VPS)
Cost-effective VPS on Dell Enterprise servers
-
1 Gbps bandwidth and unlimited traffic
-
99.99% availability and ISO certification
-
Award-winning 24/7 support and personal advisor
Step 2: Update Package Lists
Before installing new software, you must first update your system’s package lists. Ubuntu manages software through the APT (Advanced Package Tool) package manager. This accesses centralized software sources and allows programs to be installed and updated securely. So first update the package information and, if necessary, the installed packages with the following commands:
sudo apt update
sudo apt upgrade
bash
The first command downloads the current package lists from the Ubuntu repositories, while the second upgrades the installed packages. The system thus ensures that the latest available versions of software are used during installation. To run this command, you must have sudo rights.
Step 3: Install Git
After updating the package lists, you can install Git directly via the package manager. Ubuntu already offers Git in its official repositories, so no additional repositories are needed. Installing Git on Ubuntu is done with the command below:
sudo apt install git -y
bash
The parameter -y automatically confirms all installation-related requests. During installation, Ubuntu downloads the necessary files and configures Git on your system. Depending on the quality of your Internet connection and system status, this operation usually only takes a few seconds to a few minutes.
Note
If you also need graphical Git tools or integrations with other version control systems, you can install the meta package git-all instead of git. This installs a wide selection of additional Git-related packages.
Step 4: Verify Installation
After installation, it is recommended to verify that Git has been installed. To do this, you can display the installed version with the following command:
After a successful Git installation under Ubuntu 24.04, the terminal displays the version number currently installed. This confirms that Git is available on your Ubuntu system and can be used.

Displaying the Git version number confirms the successful installation of the tool.

Displaying the Git version number confirms the successful installation of the tool.
Step 5: Configure Git
Before using Git actively, you should define some basic settings. This concerns in particular your name and your email address. This information is then recorded during each Git commit so that changes can be associated with a contribution identity.
First define your name:
git config --global user.name "Votre nom"
bash
Next, register your email address:
git config --global user.email "votre-adresse@email.fr"
bash
The option --global ensures that these parameters apply to all deposits in your user account. So you only have to define them once.
To view all defined configurations, you can use the following command:
The terminal then displays an overview of all current Git settings.

In the terminal, the settings you have made are clearly displayed.

In the terminal, the settings you have made are clearly displayed.


Step 6: create a first Git repository (optional)
After theinstalling Git and basic setup, you can check out a Git tutorial or, if you already have experience, use Git directly. For example, you can create a new repository. Start by going to the desired directory:
Then initialize a new Git repository:
Git then creates a hidden directory .git. The system records all information relating to version management of your project. From this point on, you can track changes, create commits, and manage your project in a structured way.

