Git is the most advanced distributed version control system in the world.
Two: What is SVN?
SVN is the abbreviation of Subversion. It is an open source version control system. Compared with RCS and CVS, it adopts a branch management system. Its design goal is to replace CVS.
Many version control services on the Internet have migrated from CVS to Subversion. To put it simply, SVN is used for multiple people to jointly develop the same project and share resources.
SVN is a centralized version control system, and the version library is centralized on the central server.
Three: The main difference between SVN and Git?
SVN is a centralized version control system, the version library is centralized on the central server, and when working, all use your own computer, so you must first get the latest version from the central server,
then work, and finish After that, you need to push the work you have done to the central server. The centralized version control system must be connected to the Internet to work. If it is ok on a local area network, the bandwidth is large enough and the speed is fast enough,
if it is on the Internet, if the network speed is slow, I am puzzled.
Git is a distributed version control system, so it does not have a central server, and everyone's computer is a complete version library. In this way, there is no need for networking when working, because the versions
are all on their own computers. Since everyone's computer has a complete repository, how can multiple people collaborate? For example, if you change file A on your computer, and others also change file A on your computer,
At this time, the two of you only need to push each other's changes to each other, and you can see each other's changes.
The difference between git and svn - a summary
Git鼓励分Branch,而SVN,说实话,我用Branch的次数还挺少的,SVN自带的Branch merge我还真没用过,有merge时用的是Beyond Compare工具合并后再Commit的;
4)GIT没有一个全局的版本号,而SVN有:
目前为止这是跟SVN相比GIT缺少的最大的一个特征。
5)GIT的内容完整性要优于SVN:
GIT的内容存储使用的是SHA-1哈希算法。这能确保代码内容的完整性,确保在遇到磁盘故障和网络问题时降低对版本库的破坏。
6)Git下载下来后,在本地不必联网就可以看到所有的log,很方便学习,SVN却需要联网;
7)SVN在Commit前,我们都建议是先Update一下,跟本地的代码编译没问题,并确保开发的功能正常后再提交,这样其实挺麻烦的,有好几次同事没有先Updata,就Commit了,发生了一些错误,耽误了大家时间,Git可能这种情况会少些。
1。速度:
2。版本库(repository):
据我所知,SVN只能有一个指定中央版本库。当这个中央版本库有问题时,所有工作成员都一起瘫痪直到版本库维修完毕或者新的版本库设立完成。
而 Git可以有无限个版本库。或者,更正确的说法,每一个Git都是一个版本库,区别是它们是否拥有活跃目录(Git Working Tree)。如果主要版本库(例如:置於GitHub的版本库)发生了什麼事,工作成员仍然可以在自己的本地版本库(local repository)提交,等待主要版本库恢复即可。工作成员也可以提交到其他的版本库!
在SVN,当你提交你的完成品时,它将直接记录到中央版本库。当你发现你的完成品存在严重问题时,你已经无法阻止事情的发生了。如果网路中断,你根本没办法提交!
而Git的提交完全属於本地版本库的活动。而你只需“推”(git push)到主要版本库即可。Git的“推”其实是在执行“同步”(Sync)。
SVN will place a .svn in each directory. If you want to remove these .svn is very tiring.
And Git will have a .git directory at the beginning of the directory, and a .gitignore.
- Each git computer has a version library, which can do version management locally;
- high speed. git is much faster than most version management systems, including svn
- Powerful branch management function
- Active open source communities such as the most famous github
git disadvantages
- Git does not have strict permission management control. Generally, permissions are controlled by setting file read and write permissions in the system.
- The working directory can only be the entire project. For example, checkout and branching are based on the entire project. And svn can be based on a directory in the project