Why Use Git Instead of a Legacy Version Control System
来源:互联网 发布:ubuntu彻底卸载软件 编辑:程序博客网 时间:2024/04/23 22:46
from:http://www.gitguys.com/topics/why-use-git-instead-of-a-legacy-version-control-system/
Why Use Git Instead of a Legacy Version Control System?
Better history, less fear
With a typical version control system, the workflow is:
- Check out the project from the central repository
- Make modifications
- Check in/submit/commit changes back to the central repository.
Depending on the change, step 3 can strike fear into the person doing the change, since as soon as the “enter” key is pushed, the changes might introduce a bug into everybody’s code.
As a result, the natural tendency is to submit changes to the central repository as infrequently as possible: Pack in more than one bug fix when pushing code to the central repository. Maybe even toss in a new feature or two with each checkin.
However, with git, you have the ability to commit changes to your own local, private branch as often as you’d like, without modifying the central repository. You can make a separate decision on when you would like to push your local changes to the public repository. The work flow for git has an extra step:
- Check out the project from the central repository
- Make modifications
- Check in/submit/commit changes to the local repository
- Check in/submit/commit local changes back to the central repository.
The result:
- You can and likely will make more commits to your local branch.
- More commits mean a better history of the changes you’ve made to the repository: You can look back at the commit history and see which lines of code were changed for a particular bug fix, rather than having one big set of changes that fixed 3 different bugs.
Flexibility in where you work
When you check out a git project, you get the whole repository including all of its history. It contains the same contents as the original contents. You can do local commits, create new branches, and work as much as you’d like, without needing to be connected to the network or central repository.
When you’re ready to check in to a central repository, connect to a network and push the changes in.
Branching is easy
Branching on some legacy version control systems is left to experts and VCS administrators. Not so with git: Think up a new feature? Create a branch and start working on it immediately. Jump between branches. Merge branches back into the main branch.
Stash the current changes, do work on another branch, check in the changes in the other branch, then continue back where you did the “git stash” (yes, there really is a “git stash” command).
Flexible and Powerful
Git gives you all you need for basic revision control, of course. But it also gives you the tools needed for advanced revision control.
Git was designed and written by the creator of Linux, which has a similar elegant, simple, yet very flexible and powerful design. Many commands can be integrated together and used as needed which makes it even more powerful than the single commands by themselves.
Git is like Linux: It not only lets you see how it works, but also gives you the ability to creatively use the git tools to create something bigger or customized for your requirements.
Git is Fast
Everything about git is fast. It doesn’t slow you down, and doesn’t get in the way.
- Why Use Git Instead of a Legacy Version Control System
- C++ Coding Standards Item 3: Use a version control system
- Why don't we use a constructor instead of factory method?
- An Example of Mercurial Being a Distributed Version Control System
- Git : Distributed version control system
- Why should I use XML instead of HTML?
- Why use MTP instead of USB Mass Storage
- Why we should use ENUM instead of String ?
- Why use std::type_index instead of std::type_info*
- Why does MariaDB 10.2 use InnoDB instead of XtraDB?
- Use of Legacy Source Code
- storm杂谈之Why use netty as transport instead of zeromq
- use supervisor instead of nohup
- Why use a ProtocolCodecFilter
- Use legacy animation system in Unity
- JavaEnv - Version Control System.
- Version Control System
- Java学习札记10:Why generate long serialVersionUID instead of a simple 1L?
- 股票机器人能快速处理数据
- servlet笔记03:继承servlet接口开发
- maven在myeclipse8.5里的在线安装
- 保存摄像头截图
- Linux设备驱动程式学习(8)-分配内存
- Why Use Git Instead of a Legacy Version Control System
- 任何时候你的利润最大化
- 收集客户端的错误信息
- Linux设备驱动程式学习(9)-和硬件通信
- 个人赢的策略对股票投资
- css中table-layout:fixed 属性的用法
- ASP.NET 中Session使用说明
- mysql的一些功能方法
- Linux设备驱动程式学习(10)-时间、延迟及延缓操作