In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to install Git". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn how to install Git.
The birth of Git
Git was born in April 2005, and it took two weeks for Linus Torvalds, the author of Linux, to write a distributed version control system in C, which is called Git1.0. Daniel writes code like this 666666. In fact, long before Git, there were some very popular version control tools (VCS) in the world, such as CVS,SVN,ClearCase, etc., but these tools were either slow or charged, and none of them were Linus Torvalds. At that time, there was a company called BitMover, which had a product called BitKeeper, which was a distributed version control tool, but it was a fee, but it was a compassionate company. Boss Larry persuaded Linus Torvalds to use BitKeeper to manage Linux kernel source code, so the Linux kernel development team used BitKeeper to manage Linux source code between 2002 and 2005. But in the course of development, Linus Torvalds had a restless partner named Andrew Turtledove, who wrote a simple program to connect to the repository of BitKeeper. Larry McVoy, the copyright owner of BitKeeper, thought that Andrew Turtledove reverse-engineered the protocols used inside BitKeeper and decided to withdraw the license to use BitKeeper for free. The cooperation could not continue, so Linus Torvalds decided to develop a set of distributed version control tools, that is, Git. As for why this distributed version control tool is called Git,Linus Torvalds, it did not give a satisfactory explanation to everyone, but many developers have been trying to give Git a reasonable explanation. A common explanation is Global Information Tracker (global information tracker). If it hadn't been forced by BitMover, we wouldn't have seen such an excellent distributed version control tool.
Advantages of Git
Git has become the most popular distributed version control tool as soon as it was born. In April 2008, GitHub was officially launched. GitHub is a shared hosting service that uses Git for version control to store code and content. After GitHub was launched, many open source projects have been transplanted to GitHub. No matter which language you are engaged in, you will find the projects you need on GitHub. OK, having said so much, it's time to talk about the advantages of Git as a distributed version control tool. Git has the following main advantages:
1. Different from the traditional centralized version control tools, distributed version control tools can work without networking, and each computer is a complete version repository.
2.Git is capable of developing on a scale of tens of thousands of people. Just take a look at the open source projects in GitHub. I don't need to say any more.
3. Excellent performance. We said earlier that Linus Torvalds is reluctant to use version control tools such as CVS and SVN because of their poor performance. So when developing Git, Linus Torvalds decided to get rid of the long-standing malpractices and ensure the running efficiency of Git. When I was doing development in my last company, I was poisoned by SVN, but the company was still reluctant to move to Git. I guess it was because the project manager couldn't use it.
4. Ensure the safety of the project. We know that before SVN, there is a centralized version control tool called CVS, this CVS has a problem, that is, your files will sometimes be inexplicably lost, developers all know that if you suddenly have a file missing in the project, you will not sweat. Therefore, Git uses SHA1, a general encrypted hash function, to name objects in the database to ensure the security of the file.
5. A useful branch. Anyone who has used Git knows how cool it is to use branches in Git, which are very common in our projects, but SVN has branches, but it can't be as cool as Git. This guy who has done the project knows it. We will introduce the use of branches in detail later.
There are many advantages of OK,Git, I will not list them one by one here, and those who are interested will search on their own.
Installation of Git
As a loser programmer, my notebook is still windows, but my notebook is equipped with dual systems, so I will only show you how to install Git under Windows and how to install Git under Ubuntu.
Windows7 install Git
There are two solutions for windows installation Git as a whole.
A: installing Cygwin is used to simulate the Linux running environment, but the large configuration of Cygwin is very troublesome and error-prone, so this method is generally not recommended.
B: install a stand-alone Git, that is, msysGit, which is a simple exe file, and next will be installed all the way. After the installation is successful, find Git Bash in your start menu, click Git Bash, and type git-version to view the git version number. The running interface is as follows:
Ubuntu install Git
Ubuntu installation of Git is just one sentence:
Sudo apt-get install git
Earlier versions of Linux simply ran the following code:
Sudo apt-get install git-core
After the installation is successful, type git-version to view the git version number.
Basic configuration
Whether it is Windows installation or Linux installation, after installation, we will first make a basic configuration with the following two lines of commands. The configuration information will be displayed at the end of each submission, so do not use information that is not convenient to disclose. If you do not configure, you will be allowed to enter a user name and password for each submission in the future. The configuration is as follows:
$git config-global user.name "zhangsan" $git config-global user.email "111@qq.com"
This configuration is saved in the .gitconfig file in the current user directory, as follows:
At this point, I believe you have a deeper understanding of "how to install Git". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.