Put Everything Under Version Control
来源:互联网 发布:品茗软件多少钱一套 编辑:程序博客网 时间:2024/05/16 11:00
Put Everything Under Version Control
Diomidis Spinellis
PUT EVERYTHiNG iN ALL YOUR PROjECTS UNDER VERSiON CONTROL.
The resources you need are there: free tools like Subversion, Git, Mercurial, and CVS; plentiful disk space; cheap and powerful servers; ubiquitous net- working; and even project-hosting services. After you’ve installed the version control software, all you need in order to put your work in its repository is to issue the appropriate command in a clean directory containing your code. And there are just two new basic operations to learn: you commit your code changes to the repository and you update your working version of the project with the repository’s version.
Once your project is under version control, you can obviously track its his- tory, see who wrote what code, and refer to a file or project version through a unique identifier. More importantly, you can make bold code changes without fear—no more commented-out code just in case you need it in the future, because the old version lives safely in the repository. You can (and should) tag a software release with a symbolic name so that you can easily revisit in the future the exact version of the software your customer runs. You can create branches of parallel development: most projects have an active development branch and one or more maintenance branches for released versions that are actively supported.
A version control system minimizes friction among developers. When pro- grammers work on independent software parts, these get integrated almost by magic. When they step on one another’s toes, the system notices and allows them to sort out the conflicts. With some additional setup, the system can notify all developers for each committed change, establishing a common understanding of the project’s progress.
136 97 Things Every Programmer Should Know

When you set up your project, don’t be stingy: place all the project’s assets under version control. In addition to the source code, include the documenta- tion, tools, build scripts, test cases, artwork, and even libraries. With the com- plete project safely tucked into the (regularly backed up) repository, the potential damage of losing your disk or data is minimized. Setting up for development on a new machine involves simply checking out the project from the reposi- tory. This simplifies distributing, building, and testing the code on different platforms: on each machine, a single update command will ensure that the software is the current version.
Once you’ve seen the beauty of working with a version control system, follow- ing a couple of rules will make you and your team even more effective:
• Commit each logical change in a separate operation. Lumping many changes together in a single commit will make it difficult to disentangle them in the feature. This is especially important when you make project-wide refactor- ings or style changes, which can easily obscure other modifications.
• Accompany each commit with an explanatory message. At a minimum, describe succinctly what you’ve changed, but if you also want to record the change’s rationale, this is the best place to store it.
• Finally, avoid committing code that will break a project’s build, otherwise you’ll become unpopular with the project’s other developers.
Life under a version control system is too good to ruin it with easily avoidable missteps.
- Put Everything Under Version Control
- Put Everything Under Version Control
- Everything is perfectly under control
- is already under version control
- Get Your Database Under Version Control
- svn is already under version control问题解决
- SVN is already under version control问题解决
- svn is already under version control问题解决
- Operation failed: svn: ' ' already under version control
- SVN is already under version control问题解决
- svn is already under version control问题解决
- SVN is already under version control问题解决
- svn is already under version control问题解决
- svn is already under version control
- 解决SVN: Folder already under version control
- SVN is already under version control问题解决
- Mac Svnx already under version control
- svn is already under version control问题解决
- linux suse升级到4.8.2
- The Professional Programmer
- 河南哪治自闭症
- bash将执行结果保存为变量
- 网络连接
- Put Everything Under Version Control
- SimpleAdapter和Baseadapter填充listActivity-android学习之旅()
- 实现iOS应用图标右上角数字badge number提醒
- 河南哪儿治疗自闭症专业
- S5PV210友善smart tiny 210板子led测试程序 test程序不能再板子运行
- 沙箱中的间谍——可行的 JavaScript 高速缓存区攻击
- proc * 11g PCC-S-02015 错误解决方案
- iOS中的排序笔记
- Chisel实验笔记(一)