In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to install the latest version of Git on Ubuntu. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
It is very easy to install Git on Ubuntu. It exists in the main repository of Ubuntu, and you can install it with the apt command like this:
Sudo apt install git
It's simple? Isn't that right?
The only minor problem (which may not be a problem at all) is the Git version of it.
On LTS systems, software stability is critical, which is why Ubuntu 18.04 and other distributions often offer older but stable versions of software that have been well tested by distributions.
This is why when you check the Git version, you will see that the installed version is older than the current Git version on the Git website:
$git-- versiongit version 2.17.1
At the time of writing this tutorial, version 2.25 is available on the website. So, how do I install the latest Git on Ubuntu?
Install the latest Git on the Ubuntu-based Linux distribution
One way is to install from the source code. This cool and old-fashioned approach is not for everyone. Fortunately, the Ubuntu Git maintenance team provides PPA, which you can use to easily install the latest stable Git version.
Sudo add-apt-repository ppa:git-core/ppasudo apt updatesudo apt install git
Even if you have previously installed Git using apt, it will be updated to the latest stable version.
$git-- versiongit version 2.25.0
The advantage of using PPA is that if a new stable version of Git is released, it is available through system updates. Update Ubuntu only to get the latest stable version of Git.
Configure Git (recommended to developers)
If you install Git for development purposes, you will soon start cloning the repository, making changes, and committing changes.
If you try to submit code, you may see an error like "Please tell me who you are":
$git commit-m "update readme" * Please tell me who you are. Run git config-global user.email "you@example.com" git config-global user.name "Your Name" to set your account's default identity.Omit-global to set the identity only in this repository. Fatal: unable to auto-detect email address (got 'abhishek@itsfoss. (none)')
This is because you have not yet configured the necessary personal information.
As the error has implied, you can set the global Git configuration like this:
Git config-global user.name "Your Name" git config-global user.email "you@example.com"
You can check the Git configuration using the following command:
Git config-list
It should display the following output:
User.email=you@example.comuser.name=Your Name
The configuration is saved in ~ / .gitconfig. You can modify the configuration manually.
Thank you for reading! This is the end of the article on "how to install the latest version of Git on Ubuntu". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.