What is a Git

Git is distributed version control software originally created by Linus Torvalds (the creator of Linux) and released as the GPL in 2005.

It was originally designed to better manage Linux kernel development.

It should be noted that this is different from GNU Interactive Tools, a file manager similar to the Norton Commander interface.

Git was initially driven by BitKeeper and Monotone.

Git was originally developed as a back end that could be wrapped by other front ends, such as Cogito or Stgit, but the Git kernel has matured enough to be used as version control in its own right.

Many well-known software projects use Git for version control, including the development of the Linux kernel, X.Org server, and OLPC kernel

Some of the history

Starting in 2002, Linus Torvalds decided to use BitKeeper as the primary version control system for the Linux kernel to maintain code.

But because BitKeeper is proprietary, this decision has long been questioned in the community.

In the Linux community, Richard Stallman and members of the Free Software Foundation, in particular, advocate the use of open source software as a version control system for the Linux kernel.

Linus Torvalds considered using off-the-shelf software (such as Monotone) as a version control system, but these had some problems, notably poor performance.

Off-the-shelf solutions, such as the CVS architecture, have also been criticized by Linus Torvalds.

In 2005, Andrew Trigu wrote a simple program that connected to BitKeeper’s repository, and Larry McAvoy, the copyright owner of BitKeeper, decided to withdraw his license to use BitKeeper for free, believing that Andrew Trigu had reverse-engineered the protocols used inside BitKeeper.

The Linux kernel development team held discussions with BitMover, but were unable to resolve their differences.

Linus Torvalds decided to develop his own version control system to replace BitKeeper and wrote the first version of Git in ten days.

Git’s main functions

Git is a version control tool used for Linux kernel development. Different from centralized version control tools such as CVS and Subversion, git adopts the method of distributed version library. It does not need server-side software to operate version control, making source code release and communication extremely convenient.

Git is fast, which is naturally important for large projects such as the Linux kernel.

Git is best known for its ability to merge tracing.

In fact, when the kernel development team decided to start developing and using Git as a version control system for kernel development, there was a lot of opposition from the open source community around the world. The biggest reason was that Git was too difficult to understand, which is true in terms of its inner workings.

However, as development progressed, git’s normal use was performed by friendly commands, which made Git very useful.

Now, more and more famous projects use Git to manage project development, such as: wine, U-boot and so on

As an open source free fundamentalist project, Git does not impose any restrictions on the permission to browse and modify the repository, and other tools can achieve limited permission control, such as Gitosis and CodeBeamer MR.

Git was originally only used on Linux/Unix platforms, but it is becoming more and more popular on Windows, thanks to Cygwin, MsysGit, and easy-to-use GUI tools like TortoiseGit.

Git source code has been added to Cygwin and MinGW compilation environment support and gradually improved, for Windows users to bring good news.

What is version control

Git as a version control tool, it is easy to understand what version control is before using it.

In fact, the problem of version control is very frequent in life, such as how to put furniture in a new environment;

It is possible to move the furniture around and still feel most comfortable at the beginning, so that each move of the furniture can be understood as a version iteration.

Version control issues are common at work, where your boss or colleagues ask you to change the solution and add or remove features…….

There is no doubt that these things will produce dissatisfaction and energy consumption, and then affect the mood.

For programmers, fixing code is routine; Without a version control tool to solve this problem, it would be a pain.

Git is an example of a tool that makes it easy to iterate through versions and roll back if you get confused about whether the first version is better.

In my work, I seldom encounter one person to develop the project, but more often, there are many people to develop the project.

One person development will inevitably encounter problems, many people development can imagine the problem will only be more.

The use of Git can effectively organize parallel development, clear the progress of their respective work, reduce human error, statistical workload, improve development efficiency…..

In short, if you don’t know Git or something like it, you’re probably wasting a lot of time at work that you should be resting on.

The major version controllers are as follows:

  • Git
  • SVN (Subversion)
  • CVS (Concurrent Versions System)
  • VSS (Micorosoft Visula SourceSafe)
  • TFS (Team Foundation Server)
  • Visual Studio Online
  • .

Although they are both version controllers, they work in different modes. Take Git and SVN separately for example

The SVN uses the centralized version control mode. In this mode, all version data is stored on one server.

Developers can sync updates or upload their own changes from the server, which has both advantages and disadvantages.

The advantage is that it’s more secure, why is that safe and I’ll talk about that when I talk about another mode, but the disadvantage is that a single point of failure if the server is damaged that’s a big problem, and you can’t work offline and you have to be connected.

GIt uses distributed version control, where version data is synchronized to each developer’s local repository.

There are disadvantages, but of course there are more advantages. With this mode, developers can view the complete version data locally and do not need to network to synchronize the version data in the server. After modifying the code, you only need to submit it locally, and then it will be automatically pushed to the corresponding server and user after networking. Even if the server is down, there will be no serious situation. There will also be backup on the developer’s hand.

The disadvantage of nature is not too safe, each developer’s computer is a complete version of the library, causing hidden dangers can be imagined…..

This is why some companies still use SVN.

How to get Git

How to obtain Git

Git git git git git git git git git

But the official website download may encounter a very slow download speed, how to solve the problem?

You can save some time by accessing images to improve download speed

Taobao mirror

Installing Git is simple, if you're running Windows, you don't have to think about the next step

If you have downloaded Git before, you need to clean it up before you can install it

You can specify the default text editor when installing Git

You can see vim, np++ and even Vscode, you can choose according to your preference.

Try using Vim, which will help you learn Linux. (This is also the text editor git uses by default)

Check out this article I wrote on Linux for more details about Vim.

Once the installation is complete, you can see the above three programs, and you can see the Git GUI and Git Bash by right clicking on the blank area of your desktop.

If not, you can add it yourself, and tinder supports it

You can also see Git GUI and Git Bash by right clicking on the folder selected.

First of all, what are the three new applications

  • Git Bash: Unix and Linux command lines, most used.
  • Git CMD: Windows style command line
  • Git GUI: Graphical Git interface, not recommended for beginners; Familiarize yourself with common commands

Well, that’s the end of the installation and if you have time tomorrow you should write some simple git uses.


Relax your eyes

Original picture P station address

Painters home page