<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Git Archives - LinuxTuto</title>
	<atom:link href="https://www.linuxtuto.com/tag/git/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.linuxtuto.com/tag/git/</link>
	<description>Linux Sysadmin and DevOps blog</description>
	<lastBuildDate>Thu, 15 Aug 2024 13:00:02 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://www.linuxtuto.com/wp-content/uploads/2022/01/cropped-LT_faveicon-32x32.png</url>
	<title>Git Archives - LinuxTuto</title>
	<link>https://www.linuxtuto.com/tag/git/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">201456972</site>	<item>
		<title>How to Install Git on Ubuntu 24.04</title>
		<link>https://www.linuxtuto.com/how-to-install-git-on-ubuntu-24-04/</link>
					<comments>https://www.linuxtuto.com/how-to-install-git-on-ubuntu-24-04/#respond</comments>
		
		<dc:creator><![CDATA[LinuxTuto]]></dc:creator>
		<pubDate>Thu, 15 Aug 2024 13:00:02 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Git]]></category>
		<guid isPermaLink="false">https://www.linuxtuto.com/?p=1793</guid>

					<description><![CDATA[<p>Git is a distributed version control system (VCS) used for tracking changes in source code during software development. It allows multiple developers to work on...</p>
<p>The post <a href="https://www.linuxtuto.com/how-to-install-git-on-ubuntu-24-04/">How to Install Git on Ubuntu 24.04</a> appeared first on <a href="https://www.linuxtuto.com">LinuxTuto</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Git is a distributed version control system (VCS) used for tracking changes in source code during software development. It allows multiple developers to work on a project simultaneously, making it easier to collaborate, manage, and track changes.</p>
<p>It is widely used in software development, from small personal projects to large-scale enterprise applications. Git is the backbone of many collaborative development workflows, enabling teams to work together efficiently and effectively.</p>
<p>In this tutorial, we will show you how to install Git on a Ubuntu 24.04 OS.</p>
<h2><span class="has-inline-color has-vivid-purple-color">Method 1: Install Git with default package manager APT</span></h2>
<p>Installing Git with a package manager like apt offers you ease of installation; it also allows you easily manage and update Git. However, the version in the default repository is often not the latest release.</p>
<p>The version of Git you get with this method may not be the latest version. This is because Ubuntu prioritizes stability and thorough testing over cutting-edge updates to ensure that software in the official repositories is reliable and secure for users.</p>
<p>Ubuntu 24.04 should have git installed by default. Run the following command to check if you have git installed:</p>
<pre><code># git --version</code></pre>
<p>If Git is already installed, the version should be displayed:</p>
<pre><code>git version 2.43.0</code></pre>
<p>In order to have the latest LTS version, you will need to add a PPA repository using the following command:</p>
<pre><code># add-apt-repository ppa:git-core/ppa </code></pre>
<p>Once you are done, update the repository with the following command:</p>
<pre><code># apt update &amp; apt upgrade</code></pre>
<p>Then install Git:</p>
<pre><code># apt install git</code></pre>
<p>Verify the installation and display the Git version:</p>
<pre><code>git --version</code></pre>
<p>Output:</p>
<pre><code>git version 2.46.0</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Method 2: Install Git from source code</span></h2>
<p>If you want to install a different version of Git you can use the following method to install Git.</p>
<p>First, you need to install some packages that are required for the successful installation and functioning of Git.</p>
<pre><code># apt install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev build-essential</code></pre>
<p>Once the packages have been installed, you can go to download Git from the <a href="https://git-scm.com/download/linux" target="_blank" rel="noopener">download page</a>.</p>
<p><img fetchpriority="high" decoding="async" class="aligncenter size-full wp-image-1795" src="https://www.linuxtuto.com/wp-content/uploads/2024/08/git_linux_01.webp" alt="Install Git on Linux" width="691" height="149" srcset="https://www.linuxtuto.com/wp-content/uploads/2024/08/git_linux_01.webp 691w, https://www.linuxtuto.com/wp-content/uploads/2024/08/git_linux_01-300x65.webp 300w, https://www.linuxtuto.com/wp-content/uploads/2024/08/git_linux_01-684x147.webp 684w" sizes="(max-width: 691px) 100vw, 691px" /></p>
<p>In our case we will install <strong>2.46.0 </strong>version.</p>
<pre><code># wget https://www.kernel.org/pub/software/scm/git/git-2.46.0.tar.gz</code></pre>
<p>Run the following command to extract the downloaded archive:</p>
<pre><code># tar -xvf git-2.46.0.tar.gz</code></pre>
<p>Navigate to the extracted directory with the following command:</p>
<pre><code># cd git-2.46.0</code></pre>
<p>Run the following commands to compile the Git source code and install Git and also restart the bash shell to save the changes:</p>
<pre><code># make prefix=/usr/local all 
# make prefix=/usr/local install 
# exec bash</code></pre>
<p>To verify the installation, use the following command:</p>
<pre><code>git --version</code></pre>
<p>Output:</p>
<pre><code>git version 2.46.0</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Basic configuration</span></h2>
<p>Once Git is installed, you will need to configure it with the Git config command:</p>
<pre><code>git config --global user.name "Linux Tuto" </code></pre>
<pre><code>git config --global user.email "your_email@example.com" </code></pre>
<p>Verify the changes:</p>
<pre><code># git config --list
user.name=Linux Tuto
user.email=your_email@example.com
</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Comments and Conclusion</span></h2>
<p>That’s it. You have successfully installed Git on Ubuntu 24.04.</p>
<p>For additional help or useful information, we recommend you to check  <a href="https://git-scm.com/doc" target="_blank" rel="noopener">the official Git documentation.</a></p>
<p>If you have any questions please leave a comment below.</p>
<p>The post <a href="https://www.linuxtuto.com/how-to-install-git-on-ubuntu-24-04/">How to Install Git on Ubuntu 24.04</a> appeared first on <a href="https://www.linuxtuto.com">LinuxTuto</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.linuxtuto.com/how-to-install-git-on-ubuntu-24-04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1793</post-id>	</item>
	</channel>
</rss>
