The difference between git, svn, github and code cloud [reprint]

1. The difference between git and github (https://www.oschina.net/)

2. Introduction to Code Cloud (http://git.oschina.net/)

Code Cloud is a completely free code hosting service based on Git launched by the open source Chinese community in 2013. This service is developed based on Gitlab open source software. We have made a lot of improvements and customized development on the basis of Gitlab. The largest code hosting system, dedicated to providing domestic developers with high-quality and stable hosting services.

Code cloud main functions

In addition to providing the most basic Git code hosting, Code Cloud also provides code online viewing, historical version viewing, Fork, Pull Request, packaged download of any version, Issue, Wiki, protected branches, code quality inspection, PaaS project demonstration, etc. for convenient management , development, collaboration, sharing capabilities.

 

 3. Comparison of code cloud and github 

Advantages: The server is in China, and the access speed in China is much faster than that of github. You can make your warehouse invisible to others for free, but you don't know if it is safe. The access speed is very fast, and it supports svn and git. Free accounts can also create  private projects, but   you must  pay for creating private projects on github .

Disadvantages: Each warehouse has a capacity limit of 1G, which will exceed the Unity project.

 

4. The difference between git and svn

 

GIT is not just a version control system, it is also a content management system (CMS), work management system, etc. If you are someone with a background in using SVN, you will need to do some mental transformation to accommodate some of the concepts and features provided by GIT. So, the main purpose of this article is to help you understand what GIT can do and how it differs from SVN on a deep level.

1. GIT is distributed, SVN is not:

This is the core difference between GIT and other non-distributed version control systems, such as SVN, CVS, etc. If you can understand the concept, then you're halfway there. A little disclaimer, GIT is not the first or only distributed version control system out there. There are also some systems, such as BitkeeperMercurial , etc., which also run in distributed mode. But GIT does this better and has more powerful features.

Like SVN, GIT has its own centralized repository or server. However, GIT is more inclined to be used in a distributed mode, that is, each developer will clone his own repository on his own machine after checking out the code from the central repository/server. Suffice it to say that if you're stuck somewhere with no internet connection, like on a plane, in a basement, in an elevator, etc., you'll still be able to commit files, view revision history, fork projects, etc. To some people, this may not seem like much use, but when you suddenly encounter an environment with no network, this will solve your big trouble.

Also, this distributed mode of operation is a huge boon for the development of the open source software community. You don't have to make a patch package and send it by email as before, you just need to create a branch and send it to the project team. Send a push request. This keeps your code up to date and not lost in transit. GitHub.com is a good example of this.

There are rumors that future versions of subversion will also be based on distributed mode. But at least not yet.

2.GIT把内容按元数据方式存储,而SVN是按文件:

所有的资源控制系统都是把文件的元信息隐藏在一个类似.svn,.cvs等的文件夹里。如果你把.git目录的体积大小跟.svn比较,你会发现它们差距很大。因为,.git目录是处于你的机器上的一个克隆版的版本库,它拥有中心版本库上所有的东西,例如标签,分支,版本记录等。

3.GIT分支和SVN的分支不同:

分支在SVN中一点不特别,就是版本库中的另外的一个目录。如果你想知道是否合并了一个分支,你需要手工运行像这样的命令svn propget svn:mergeinfo,来确认代码是否被合并。感谢Ben同学指出这个特征。所以,经常会发生有些分支被遗漏的情况。

然而,处理GIT的分支却是相当的简单和有趣。你可以从同一个工作目录下快速的在几个分支间切换。你很容易发现未被合并的分支,你能简单而快捷的合并这些文件。

4.GIT没有一个全局的版本号,而SVN有:

目前为止这是跟SVN相比GIT缺少的最大的一个特征。你也知道,SVN的版本号实际是任何一个相应时间的源代码快照。我认为它是从CVS进化到SVN的最大的一个突破。因为GIT和SVN从概念上就不同,我不知道GIT里是什么特征与之对应。如果你有任何的线索,请在评论里奉献出来与大家共享。

更新:有些读者指出,我们可以使用GIT的SHA-1来唯一的标识一个代码快照。这个并不能完全的代替SVN里容易阅读的数字版本号。但,用途应该是相同的。

5.GIT的内容完整性要优于SVN:

GIT的内容存储使用的是SHA-1哈希算法。这能确保代码内容的完整性,确保在遇到磁盘故障和网络问题时降低对版本库的破坏。这里有一个很好的关于GIT内容完整性的讨论 –http://stackoverflow.com/questions/964331/git-file-integrity

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326293164&siteId=291194637