Skip to Content
程序员的38堂成长课
book

程序员的38堂成长课

by Pete Goodliffe
January 2022
Beginner to intermediate
314 pages
6h 55m
Chinese
Posts & Telecom Press
Content preview from 程序员的38堂成长课
高效版本控制
155
但是,要注意分支并不总是最合适的并发开发技术。有时候,采用基于代码主线的简单的
特性开关
4
方法来管理多个实际上不可见的并发开发工作(以及随之而来的周期性集成开
销)会更好。
20.6
 代码的家园
版本控制系统的仓库是代码的家园。
在看过足够多的大型项目之后,你会发现任何有一定复杂度的项目的源代码都倾向于去适
应存储源代码的版本控制系统。
这是随着项目及其基础设施的发展而发生的。随着代码从婴儿期进入青春期,构建脚本和
发布工具将与仓库进行深度集成。例如,自动版本更新脚本会驱动版本控制机制。遵循某
些文件结构约定是因为版本控制系统强制要求这样做(例如,是否存在空目录,或者是否
可以创建符号链接)。
无论好坏,这些东西都会影响你处理代码的方式。
要诀
源代码栖息在存储它的版本控制系统中。一个项目越成熟,它对这个
栖息地的依赖就越大。
因为重视仓库中记录的修订历史,所以我们不经常在不同的版本控制系统之间迁移项目。
迁移是可能的,但通常是一个会造成损失和混乱的过程。这是在项目开始时选择适当的版
本控制系统的关键原因。
20.7
 结论
版本控制系统是基本的软件开发工具之一。每个程序员都应该熟练地使用版本控制系统,
就像应该熟练地掌握一个强大的源代码编辑器一样。
版本控制系统是团队协作的基础。它对于软件开发非常重要,但是还可以用于许多其他的
目的,例如管理文档树。本书书稿在编写过程中就是采用
AsciiDoc
格式保存在了
Git
中。
这让我可以很容易地备份我的作品,毫不费力地在计算机之间移动文件,跟踪所做的更
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

管理Kubernetes

管理Kubernetes

Brendan Burns, Craig Tracey
Python应用开发指南

Python应用开发指南

Posts & Telecom Press, Ninad Sathaye
解密金融数据

解密金融数据

Justin Pauley

Publisher Resources

ISBN: 9787115577948