{"title":"摆脱Git的地狱:防止Git的常见陷阱","authors":"David A. Lippa","doi":"10.1145/2993274.3011284","DOIUrl":null,"url":null,"abstract":"At Amazon, Release Engineering falls under what we call Operational Excellence: designing, implementing, maintaining, and releasing a scalable product. There is an even more basic component that is often ignored: source control. Good source control practices are necessary but not sufficient for delivering good software. Over the 25+ years source control has been used, each tool has come with its own set of pitfalls: CVS, subversion, mercurial, and most recently, git. For decades, the unwritten rule has been for each organization to identify and mitigate these pitfalls independently, with an expectation that the next innovation would remediate it. This approach scales neither for large organizations such as Amazon nor the software engineering community at large. The real source of this dysfunction—remote collaboration between software engineers—must be examined and ultimately fixed. In the interim, it is up to the engineering community to share practices independent of software process to make up the difference. At its core, source control is a fundamental tool of software engineers, expected to be easily understood and “just work;” this assumption is invalid on a number of dimensions. Neither Software Configuration Management (SCM) nor the tools used are intuitive to new practitioners, and must be taught. The changing landscape of newer tools misleads even expert users of past tools who are not screened for this critical skill. And finally, success is dependent upon synthesis of past experience and tuning a pre-determined process to both project goals and the team. Success, then, is stacked against the engineering team—so what happens when source control usage goes horribly wrong? The baseline and team end up in “Git Hell,” slowed down, or even blocked, by the very tool that facilitates collaboration and parallel development. “Git Hell” originates from various sources: poor tool design, misuse or misconfiguration of the command line interface, and lack of understanding of the “nuts and bolts” of the tool. For example, poor interface design or configuration, even with the command line interface, has widespread impact. A substantial flaw in the mechanics of git push caused substantial pain at multiple engineering firms. The interface was straightforward: a push sends all branches with updates to the server; adding the -f option forces an update; combining them proved disastrous, as an engineer with minimal knowledge of git could harm the integrity of the baseline without even realizing it. This prior version required each developer to add local configuration to his workstation, ensuring others in the future would repeat the mistake. These classes of issues are repeated at company after company, group after group—illustrating a systemic problem with git, its configuration, the instruction in its usage, and the interaction between collaborating engineers. To combat this, I generalized preventative measures as a workaround in a workshop entitled “Get out of Git Hell” that can be shared among engineers regardless of experience or process, at least until the root causes can be studied and remediated.","PeriodicalId":143542,"journal":{"name":"Proceedings of the 4th International Workshop on Release Engineering","volume":"98 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2016-11-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Get out of Git hell: preventing common pitfalls of Git\",\"authors\":\"David A. Lippa\",\"doi\":\"10.1145/2993274.3011284\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"At Amazon, Release Engineering falls under what we call Operational Excellence: designing, implementing, maintaining, and releasing a scalable product. There is an even more basic component that is often ignored: source control. Good source control practices are necessary but not sufficient for delivering good software. Over the 25+ years source control has been used, each tool has come with its own set of pitfalls: CVS, subversion, mercurial, and most recently, git. For decades, the unwritten rule has been for each organization to identify and mitigate these pitfalls independently, with an expectation that the next innovation would remediate it. This approach scales neither for large organizations such as Amazon nor the software engineering community at large. The real source of this dysfunction—remote collaboration between software engineers—must be examined and ultimately fixed. In the interim, it is up to the engineering community to share practices independent of software process to make up the difference. At its core, source control is a fundamental tool of software engineers, expected to be easily understood and “just work;” this assumption is invalid on a number of dimensions. Neither Software Configuration Management (SCM) nor the tools used are intuitive to new practitioners, and must be taught. The changing landscape of newer tools misleads even expert users of past tools who are not screened for this critical skill. And finally, success is dependent upon synthesis of past experience and tuning a pre-determined process to both project goals and the team. Success, then, is stacked against the engineering team—so what happens when source control usage goes horribly wrong? The baseline and team end up in “Git Hell,” slowed down, or even blocked, by the very tool that facilitates collaboration and parallel development. “Git Hell” originates from various sources: poor tool design, misuse or misconfiguration of the command line interface, and lack of understanding of the “nuts and bolts” of the tool. For example, poor interface design or configuration, even with the command line interface, has widespread impact. A substantial flaw in the mechanics of git push caused substantial pain at multiple engineering firms. The interface was straightforward: a push sends all branches with updates to the server; adding the -f option forces an update; combining them proved disastrous, as an engineer with minimal knowledge of git could harm the integrity of the baseline without even realizing it. This prior version required each developer to add local configuration to his workstation, ensuring others in the future would repeat the mistake. These classes of issues are repeated at company after company, group after group—illustrating a systemic problem with git, its configuration, the instruction in its usage, and the interaction between collaborating engineers. To combat this, I generalized preventative measures as a workaround in a workshop entitled “Get out of Git Hell” that can be shared among engineers regardless of experience or process, at least until the root causes can be studied and remediated.\",\"PeriodicalId\":143542,\"journal\":{\"name\":\"Proceedings of the 4th International Workshop on Release Engineering\",\"volume\":\"98 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2016-11-18\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 4th International Workshop on Release Engineering\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/2993274.3011284\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 4th International Workshop on Release Engineering","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2993274.3011284","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
摘要
在Amazon,发布工程属于我们所谓的卓越运营:设计、实现、维护和发布可伸缩的产品。还有一个更基本的组件经常被忽略:源代码控制。好的源代码控制实践对于交付好的软件是必要的,但还不够。在使用源代码控制的25年多的时间里,每个工具都有自己的一组缺陷:CVS、subversion、mercurial,以及最近的git。几十年来,每个组织都有一个不成文的规则,即独立地识别和减轻这些缺陷,并期望下一次创新能够弥补这些缺陷。这种方法既不适用于像Amazon这样的大型组织,也不适用于整个软件工程社区。这种功能失调的真正根源——软件工程师之间的远程协作——必须被检查并最终解决。在此期间,由工程社区共享独立于软件过程的实践来弥补差异。在其核心,源代码控制是软件工程师的基本工具,期望易于理解和“正常工作”;这个假设在许多维度上是无效的。软件配置管理(SCM)和所使用的工具对新的从业者来说都不是直观的,必须教授。新工具不断变化的前景甚至误导了过去工具的专家用户,他们没有被筛选出这一关键技能。最后,成功依赖于对过去经验的综合,并根据项目目标和团队调整预先确定的过程。那么,成功是对工程团队不利的——那么,当源代码控制的使用出现严重错误时会发生什么呢?基线和团队最终会陷入“Git地狱”,被促进协作和并行开发的工具拖慢,甚至阻碍。“Git地狱”源于各种各样的原因:糟糕的工具设计、命令行界面的误用或错误配置,以及对工具的“具体细节”缺乏理解。例如,糟糕的界面设计或配置,即使使用命令行界面,也会产生广泛的影响。git推送机制中的一个重大缺陷给多家工程公司带来了巨大的痛苦。界面很简单:推送将带有更新的所有分支发送到服务器;添加-f选项强制更新;将它们结合在一起被证明是灾难性的,因为一个对git知之甚少的工程师可能会在没有意识到的情况下损害基线的完整性。之前的版本要求每个开发人员将本地配置添加到他的工作站,以确保其他人在将来会重复这个错误。这类问题在一个接一个的公司、一个接一个的小组中反复出现——说明git的一个系统性问题、它的配置、它的使用说明以及协作工程师之间的交互。为了解决这个问题,我在一个名为“Get out of Git Hell”的研讨会上将预防措施概括为一种解决方法,可以在工程师之间共享,无论经验或过程如何,至少直到可以研究和补救根本原因为止。
Get out of Git hell: preventing common pitfalls of Git
At Amazon, Release Engineering falls under what we call Operational Excellence: designing, implementing, maintaining, and releasing a scalable product. There is an even more basic component that is often ignored: source control. Good source control practices are necessary but not sufficient for delivering good software. Over the 25+ years source control has been used, each tool has come with its own set of pitfalls: CVS, subversion, mercurial, and most recently, git. For decades, the unwritten rule has been for each organization to identify and mitigate these pitfalls independently, with an expectation that the next innovation would remediate it. This approach scales neither for large organizations such as Amazon nor the software engineering community at large. The real source of this dysfunction—remote collaboration between software engineers—must be examined and ultimately fixed. In the interim, it is up to the engineering community to share practices independent of software process to make up the difference. At its core, source control is a fundamental tool of software engineers, expected to be easily understood and “just work;” this assumption is invalid on a number of dimensions. Neither Software Configuration Management (SCM) nor the tools used are intuitive to new practitioners, and must be taught. The changing landscape of newer tools misleads even expert users of past tools who are not screened for this critical skill. And finally, success is dependent upon synthesis of past experience and tuning a pre-determined process to both project goals and the team. Success, then, is stacked against the engineering team—so what happens when source control usage goes horribly wrong? The baseline and team end up in “Git Hell,” slowed down, or even blocked, by the very tool that facilitates collaboration and parallel development. “Git Hell” originates from various sources: poor tool design, misuse or misconfiguration of the command line interface, and lack of understanding of the “nuts and bolts” of the tool. For example, poor interface design or configuration, even with the command line interface, has widespread impact. A substantial flaw in the mechanics of git push caused substantial pain at multiple engineering firms. The interface was straightforward: a push sends all branches with updates to the server; adding the -f option forces an update; combining them proved disastrous, as an engineer with minimal knowledge of git could harm the integrity of the baseline without even realizing it. This prior version required each developer to add local configuration to his workstation, ensuring others in the future would repeat the mistake. These classes of issues are repeated at company after company, group after group—illustrating a systemic problem with git, its configuration, the instruction in its usage, and the interaction between collaborating engineers. To combat this, I generalized preventative measures as a workaround in a workshop entitled “Get out of Git Hell” that can be shared among engineers regardless of experience or process, at least until the root causes can be studied and remediated.