Home  >  Article  >  Development Tools  >  What are the differences between git and github?

What are the differences between git and github?

藏色散人
藏色散人Original
2021-11-25 10:58:3426470browse

The difference between git and github: 1. git is a version management tool, while github is a website suitable for programmers to communicate; 2. git allows you to better manage your program, while github can Help programmers communicate and learn from each other.

What are the differences between git and github?

The operating environment of this article: Windows 7 system, Git version 2.30.0, Dell G3 computer.

What are the differences between git and github?

The difference and introduction between git and github

Git and github are two completely different concepts.

git ​

​ is a version management tool that can only be used locally when your computer is not connected to the Internet. The function is to allow you to better manage your program. For example, although the content you originally submitted has been modified in the future, through the tool git, you can reproduce the content you originally submitted, so that you will realize it later. Some erroneous changes can be reverted.

About github, this is a website, which is a program written by each programmer. You can build an online warehouse on github. You can submit the code to the Internet every time you submit, so that your Every time you submit, others can see your code, and others can also help you modify your code. This open source method is very convenient for communication and learning between programmers.

github

It is a website that is very suitable for programmers to communicate. Many international technology experts have their own open source code on github. Others only need to apply. With an account, you can freely see the programs written by these experts. At the same time, many domestic Internet companies, such as Baidu, Alibaba, etc., also publish open source codes on github, and interested programmers can also look for some on their own. If you want to see the codes of large domestic companies, you can check out the link: https://www.zhihu.com/question/20194937

In summary, git can be considered as a software that can help You Better Write Program is a version management tool, and github is a website that can help programmers communicate and learn from each other.

What is Git

Git is a Version Control System (VCS). Version control is a system that records changes in the content of one or several files so that you can check the revision status of a specific version in the future. With a version control system, you don't have to worry about "accidents" such as losing files or accidentally modifying files, and you can go back to a certain moment in history at will.
Early centralized version control systems such as SVN and CVS have a single centralized management server that saves revisions of all files, and people who work together connect to this server through clients and retrieve the latest file or submit an update.

Their principles are similar to the figure below

And distributed version control systems such as Git or Mercurial are the modern first choice. Because the advantages of distribution are absolutely significant.

In a distributed version control system, the client does not only extract the latest version of the file snapshot, but completely mirrors the code warehouse.

In this way, if any server used for collaborative work fails, any mirrored local warehouse can be used to recover afterwards. Because every extraction operation is actually a complete backup of the code warehouse.

What are the differences between git and github?

gitF.png

Now, world-class companies such as Google, Facebook, and Microsoft use Git every day.

As we all know, there are many great people in the IT world, but there are few great people among the great people.

Linus Torvalds is one of them.

Linus Torvalds not only created the Linux operating system but also developed the Git version control system.

The bottom layer of the current Android system is based on the modified Linux system. Do you think Linus Torvalds has made a great contribution?

The birth of Git is very interesting:

In 2005, the Linux kernel development community was facing a severe challenge: they could no longer use BitKeeper (a distributed version control system) (the reason was that Bitkeeper copyright at that time The owner decided to withdraw the authorization (the kernel development team negotiated with them to no avail), and no other SCM (Software Configuration Management) could meet the needs of their distributed system.

Linus Torvalds, the father of Linux, accepted this challenge and decided to develop a new version control system. He disappeared over the weekend, and in the new week, Git came out. LT is mighty.

Atlassian made a 10-year record chart for Git.

https://www.atlassian.com/git/articles/10-years-of-git

Github

Github and Git are two different things.

Git is a version control system, and Github is an online Git-based code hosting service.

GitHub was written in 2008 with Ruby on Rails. GitHub offers both paid and free accounts. Both accounts can create public code repositories, but paid accounts can also create private code repositories.

Why is Github so popular now that many of the source codes of the world's top companies and projects are hosted on Github--so beautiful!

Nowadays, this generation still has to look at appearance. You said that sourceforge and other code hosting websites have been around for a long time. Why are they not as popular as Github?

The key is that Github looks good (you are so good-looking, everything you say is right).

Linus Torvalds' Github page, open it and take a look. The source code of Linux is on it and will be updated at any time! !

https://github.com/torvalds

Gitlab

Github has a small The flaw (can't be considered a flaw) is that your repo (abbreviation of repository, which means "warehouse") needs to be public. If you want to create a private repo, you have to pay.

However, fortunately, Gitlab solves this problem and you can create a free private repo on it.

GitHub and GitLab are both web-based version control interfaces that serve the Internet. Github can be registered and used directly, while Gitlab needs to be deployed to the server.

The default attribute of projects created by GitLab is Private. Of course, you can also choose Public (public) or Internal (internal).

SVN, Git, Github, and Gitlab are all cool and great tools, and they are also recommended to programmers!

Recommended study: "Git Tutorial"

The above is the detailed content of What are the differences between git and github?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:what is git bashNext article:what is git bash