源码版本管理工具 :TFS GIT
至于svn 。。忽略不计了。。。
集中式代码管理 CVCS 模式:TFS
分布式代码管理 DVCS 模式:git
两者比较大的差别:tfs 只有一个中央仓储,其他副本都要与中央仓储进行更新。git 是分布式的仓储,每个副本仓储都是独立的。中央远程 origin 仓储,是用来迭代各个分布式仓储的最新的合并集。
Centralized vs Distributed Version Control Systems [CVCS vs DVCS]
Ravi Verma
We read the concept/benefits/types of Version Control Systems in our last article.
Now, I am going to shed some light on the differences between Centralized Version Control systems and Distributed Version Control Systems.
If you are fairly new to SCM and version control systems, you can direct your browser to this article where we have covered some very commonly used terms in VCS.
So, here you go…
The concept of a centralized system is that it works on a Client-Server relationship. The repository is located at one place and provides access to many clients.
Whereas, in a Distributed System, every user has a local copy of the repository in addition to the central repo on the server side.
Centralized Version Control is the simplest system with the concept of 1 central repository which servers provides latest code to the all the clients across the globe
Distributed Version Control provides flexibility and has emerged with the concept that everyone has their own repository, they don’t just check out the snapshot of the code – they fully mirror the central repository.
CVCS is easy to understand whereas DVCS has some complex process for beginners.
CVCS is dependent on the access to the server whereas DVCS provides the benefits to work offline. Everything except push and pull the code can be done without an internet connection.
CVCS is easy to administrate and has more control over users and access as it is server from one place.
DVCS is comparatively fast comparing to CVCS as you don’t have to contact the central server for every command. DVCS just takes much time on the first check-out as its mirroring the central repository on your local.
If your project has a very long history and change-sets then downloading the entire history can take an unreasonable amount of time and disk space in DVCS whereas CVCS allows you to checkout only few lines of code if you just need to work on few modules.
DVCS provides a powerful and detailed change tracking, which means fewer conflicts at the time of merge.
DVCS gives an ability that developers can share changes with one or two other members of team at a time if they want to get some feedback before showing the changes to everyone.
The revisions in DVCS are typical big guids (like fa333b7rer96cd6d3b0037d660) – it’s not incremental numbers (which is provided by CVCS) which make them harder to reference and remember.
DVCS provides an advantage wherein if the main server’s repository crashes, you still have a local repository in every developer’s local space from which you can create the main repository.
SVN and CVS are the popular tools of CVCS
GIT and Mercurial are the popular tools of DVCS
I hope now you have a good idea of differences between the different version control systems – Centralized and Distributed.
In our first entry, we explored some of the basics of any version control system – diffs and patches. Looking past diff and patches, we will now discuss version control systems. Many of you out there are familiar with centralized version control systems like Subversion (SVN), CVS, and Perforce, while others have jumped straight into the distributed version control worlds of Git and Mercurial. There are many other flavors of centralized and distributed version controls out there – each with there own advantages and disadvantages.
Centralized Version Control
There are many version control systems out there. Often they are divided into two groups: “centralized” and “distributed”.
Work smarter, better, and faster with weekly tips and how-tos.
Centralized version control systems are based on the idea that there is a single “central” copy of your project somewhere (probably on a server), and programmers will “commit” their changes to this central copy.
“Committing” a change simply means recording the change in the central system. Other programmers can then see this change. They can also pull down the change, and the version control tool will automatically update the contents of any files that were changed.
Most modern version control systems deal with “changesets,” which simply are a groups of changes (possibly to many files) that should be treated as a cohesive whole. For example: a change to a C header file and the corresponding .c file should always be kept together.
Centralized version control solves the problems described in the previous post on What is Version Control?. Programmers no longer have to keep many copies of files on their hard drives manually, because the version control tool can talk to the central copy and retrieve any version they need on the fly.
Some of the most common centralized version control systems you may have heard of or used are CVS, Subversion (or SVN) and Perforce.
A Typical Centralized Version Control Workflow
When you’re working with a centralized verison control system, your workflow for adding a new feature or fixing a bug in your project will usually look something like this:
- Pull down any changes other people have made from the central server.
- Make your changes, and make sure they work properly.
- Commit your changes to the central server, so other programmers can see them.
Distributed Version Control
In the past five years or so a new breed of tools has appeared: so-called “distributed” version control systems (DVCS for short). The three most popular of these are Mercurial, Git and Bazaar.
These systems do not necessarily rely on a central server to store all the versions of a project’s files. Instead, every developer “clones” a copy of a repository and has the full history of the project on their own hard drive. This copy (or “clone”) has all of the metadata of the original.
This method may sound wasteful, but in practice, it’s not a problem. Most programming projects consist mostly of plain text files (and maybe a few images), and disk space is so cheap that storing many copies of a file doesn’t create a noticable dent in a hard drive’s free space. Modern systems also compress the files to use even less space.
The act of getting new changes from a repository is usually called “pulling,” and the act of moving your own changes to a repository is called “pushing”. In both cases, you move changesets (changes to files groups as coherent wholes), not single-file diffs.
One common misconception about distributed version control systems is that there cannot be a central project repository. This is simply not true – there is nothing stopping you from saying “this copy of the project is the authoritative one.” This means that instead of a central repository being required by the tools you use, it is now optional and purely a social issue.
Advantages Over Centralized Version Control
The act of cloning an entire repository gives distributed version control tools several advantages over centralized systems:
- Performing actions other than pushing and pulling changesets is extremely fast because the tool only needs to access the hard drive, not a remote server.
- Committing new changesets can be done locally without anyone else seeing them. Once you have a group of changesets ready, you can push all of them at once.
- Everything but pushing and pulling can be done without an internet connection. So you can work on a plane, and you won’t be forced to commit several bugfixes as one big changeset.
- Since each programmer has a full copy of the project repository, they can share changes with one or two other people at a time if they want to get some feedback before showing the changes to everyone.
Disadvantages Compared to Centralized Version Control
To be quite honest, there are almost no disadvantages to using a distributed version control system over a centralized one. Distributed systems do not prevent you from having a single “central” repository, they just provide more options on top of that.
There are only two major inherent disadvantages to using a distributed system:
- If your project contains many large, binary files that cannot be easily compressed, the space needed to store all versions of these files can accumulate quickly.
- If your project has a very long history (50,000 changesets or more), downloading the entire history can take an impractical amount of time and disk space.
The authors and contributors of modern distributed version control systems are working on solving these problems, but at the moment, no bundled, built-in features solve them.
Conclusion
Version control systems aim to solve a specific problem that programmers face: “storing and sharing multiple versions of code files.” If you’re a programmer of any kind and you don’t use any kind of version control, you should start right now. It will make your life easier.
源码版本管理工具 :TFS GIT的更多相关文章
- [转]VS2015 Git 源码管理工具简单入门
VS2015 Git 源码管理工具简单入门 1.VS Git插件 1.1 环境 VS2015+GitLab 1.2 Git操作过程图解 1.3 常见名词解释 拉取(Pull):将远程版本库合并到本 ...
- ubuntu下linux内核源码阅读工具和调试方法总结
http://blog.chinaunix.net/uid-20940095-id-66148.html 一 linux内核源码阅读工具 windows下当然首选source insight, 但是l ...
- 【安卓本卓】Android系统源码篇之(一)源码获取、源码目录结构及源码阅读工具简介
前言 古人常说,“熟读唐诗三百首,不会作诗也会吟”,说明了大量阅读诗歌名篇对学习作诗有非常大的帮助.做开发也一样,Android源码是全世界最优秀的Android工程师编写的代码,也是A ...
- 读zepto源码之工具函数
读zepto源码之工具函数 Zepto 提供了丰富的工具函数,下面来一一解读. 源码版本 本文阅读的源码为 zepto1.2.0 $.extend $.extend 方法可以用来扩展目标对象的属性.目 ...
- (3.2)mysql基础深入——mysql源码阅读工具安装与应用
(3.2)mysql基础深入——mysql源码阅读工具安装与应用 关键字:mysql源码阅读工具 工具列举:一般多用[1][2][3]吧 [1]source insight [2]写字板/记事本 UE ...
- Windows平台下源码分析工具
最近这段时间在阅读 RTKLIB的源代码,目前是将 pntpos.c文件的部分看完了,准备写一份文档记录下这些代码的用处.处理过程.理论公式来源.注意事项,自己还没有弄明白的地方.目前的想法是把每一个 ...
- 转载~Linux 平台下阅读源码的工具
Linux 平台下阅读源码的工具 前言 看源代码是一个程序员必须经历的事情,也是可以提升能力的一个捷径.个人认为: 要完全掌握一个软件的方法只有阅读源码在Windows下有sourceinsight这 ...
- Linux 平台下阅读源码的工具链
原文:http://blog.jobbole.com/101322/ 前言 看源代码是一个程序员必须经历的事情,也是可以提升能力的一个捷径.个人认为: 要完全掌握一个软件的方法只有阅读源码. 在Win ...
- VS2015 Git 源码管理工具简单入门
1.VS Git插件 1.1 环境 VS2015+GitLab 1.2 Git操作过程图解 1.3 常见名词解释 拉取(Pull):将远程版本库合并到本地版本库,相当于(Fetch+Meger) 获取 ...
随机推荐
- Oracle学习笔记--第2章 oracle 数据库体系结构
第2章 oracle 数据库体系结构 目录: ————————————— 2.1物理存储结构 2.1.1数据文件 2.2.2控制文件 2.1.3重做日志文件 2.1.4其他文件 2.2逻辑存储结构 2 ...
- P2484 [SDOI2011]打地鼠
差分 代码: #include <bits/stdc++.h> using namespace std; #define INF 1999999999 ][],b[][],c[][]; i ...
- day10--进程
进程: Python 解释器有一个全局解释器锁(PIL),导致每个 Python 进程中最多同时运行一个线程,因此 Python 多线程程序并不能改善程序性能,不能发挥多核系统的优势,可以通过 ...
- day14--前端HTML、CSS
HTML是一个裸体的人,CSS穿上华丽的衣服,JS动起来. HTML 1. -一套规则,浏览器识别的规则 2. 开发者: 学习HTML规则 开发后台程序 - 写HTML文件(充当模板的 ...
- jquery 中remove()与detach()的区别
remove()与detach()方法都是从dom中删除所有的元素 两者的共同之处在于都不会把匹配的元素从jQuery对象中删除. 不同之处在于用remove()删除的元素,除了元素被保留,其他的在这 ...
- python tkinter-按钮.标签.文本框、输入框
按钮 无功能按钮 Button的text属性显示按钮上的文本 tkinter.Button(form, text='hello button').pack() 无论怎么变幻窗体大小,永远都在窗体的最上 ...
- HDU 1495 非常可乐【BFS】
题目链接:https://vjudge.net/problem/HDU-1495 转载于:https://www.cnblogs.com/ECJTUACM-873284962/p/6750320.ht ...
- 001.Heartbeat简介
一 Heartbeat简介 1.1 概述 Heartbeat是Linux-HA项目中的一个组件,也是当前开源HA项目中最成功的一个例子,它提供了所有HA软件所需要的基本功能,如心跳检测和资源接管.监测 ...
- MacBook快速入门
入职新美大,全面进入Mac工作环境,果断"撸起袖子加油干","浪起来,逼格提起来".顺道提一嘴,这边的兄弟们的干劲是真心足,作为一名老兵痞,必须要虚心向身边NX ...
- [洛谷P2066]机器分配
题目描述 总公司拥有高效设备M台,准备分给下属的N个分公司.各分公司若获得这些设备,可以为国家提供一定的盈利.问:如何分配这M台设备才能使国家得到的盈利最大?求出最大盈利值.其中M≤15,N≤10.分 ...