实例介绍
Gerrit已经成为了Git的标配,熟悉其原理,必读这本《Learning Gerrit Code Review》
Learning Gerrit Code Review Copyright o 2013 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews rt has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, cither express or implied. Neither the author nor Pacl Publishing and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals However, Packt Publishing cannot guarantee the accuracy of this infori First published: August 2013 Production reference: 2260813 Published by Packt Publishing ltd Livery place 35 Livery street Birmingham b3 2PB UK ISBN978-1783289479 www.packtpub.com Cover Image by Sarah Owens(saratooinkylabs com Credits Author Project Coordinator Luca milanesio Amiga Khurana Reviewers Proofreader Edwin Kempin Sarah heath Fredrik Luthander Acquisition Edit Tejal R. so Pramila balan Production coordinator Commissioning Editor Conidon miranda Mohammed fahad Cover Work Technical editors Conidon miranda Dipika gaonkar Sonali s, vernekar About the author Luca Milanesio is the director and cofounder of GerritForge, the leading git and Gerrit competence center for the enterprise. His background includes over 20 years of experience in development management, software configuration management, and software development lifecycle in large enterprises worldwide. Just prior to GerritForge Llp luca was the Technical director and senior product Executive of the security and compliance platform for electronic payments at Primeur in Italy and UK. Since starting GerritForge LLP, Luca contributed to the gerrit community and allowed the introduction of enterprise code review workflow in large enterprises worldwide including major telecoms, banks, and industries Luca Milanesio is the author of Git Patterns and Anti-Patterns, an essential guide for scaling Git to the enterprise with 16 patterns and anti-patterns, including Hybrid SCM, Git champions, blessed repository, per-feature topic branches, and ALM integration I would like to thank Shawn Pearce and Google Inc. for having created and funded the gerrit Code review project, which allowed the Android operating system to be really the result of a collaborative effort of multiple companies and developers, and inspired many more development teams in the adoption of Code review. Many thanks to the people that worked around the writing and publication of this book: Edwin and Fredrik for the extensive content review, Sarah for the copyediting, Mohammed the Commissioning Editor, Amigya the Project Coordinator, and all the other Packt staff that participated in the making of this book I would like to give a special thanks, and dedicate this book to my beloved wife Emilija and my daughter Nina, who have inspired and supported me throughout the days and nights while writing, and for making every single day of my life worth living About the reviewers Edwin Kempin is one of the maintainers of the Gerrit Code Review project. He oined the gerrit development in 2010 Since 2004 edwin is working as a software engineer at SaP AG. as a member of the java development infrastructure team, his main focus is the adoption of git and Gerrit at SAP AG I would like to thank the gerrit community for all the fantastic collaboration. Each day it's exciting to work on this project! Fredrik Luthander has been working with software configuration management since 2000 and with Gerrit since 2009. He has worked mainly as an SCm systems admin and trainer. He has also been involved in designing and teaching /rolling out CM practices with both large and small software projects Fredrik is currently a self-employed SCM consultant, with prior experience from two enterprise -sized companies and their software projects he is involved as a contributor in the gerrit open source project since 2010 Www.Packtpub.com Support files, e Books, discount offers, and more Youmightwanttovisitwww.packtpub.comforsupportfilesanddownloadsrelatedtoyour Did you know that packt offers e book versions of every book published, with pdF and epub filesavailableYoucanupgradetotheebookversionatwww.Packtpub.comandasaprint book customer you are entitled to a discount on the e book copy get in touch with us at service@packtpub com for more details Atwww.Packtpub.comyoucanalsoreadacollectionoffreetechnicalarticlessignupfora range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks PUPACKTLiB° http://packtlib. Do you need instant solutions to your It questions? PacktLib is Packt's online digital book library. Here, you can access read, and search across Packt's entire library of books Why Subscribe? Fully searchable across every book published by Packt Copy and paste, print, and bookmark content On demand and accessible via web browser Free Access for Packt account holders IfyouhaveanaccountwithPacktatwww.Packtpub.comyoucanusethistoaccessPacktlib today and view nine entirely free books. simply use your login credentials for immediate access Table of contents Preface Chapter 1: Introducing Code Review 7 Benefits of code review Build stability Knowled ge sharir 9 External early feedback 10 Shared code style Team engagement Qualitative code selection 12 Code review roles 13 Contributor 13 Reviewer 13 Committer 14 Maintainer 14 Review labels and roles customization 15 Review terms and workflow 15 Project 15 Change 16 Label code review 17 Submit change 17 Merge change 18 Abandon change 18 Summary 19 Chapter 2: Setting Up and Quick-start 21 Pre-requisites 21 Gerrit download 22 Table of contents Running Gerrit initial setup 22 Installation completed 26 Log in and create user profile 26 GeneratehttppasswordforGit 28 Create and clone your first project 30 Summar 32 Chapter 3: User Authentication 33 How gerrit user authentication works 33 Git versus gerrit Ul authentication 34 Gerrit internal accounts 35 Authenticating over the Internet through OpenID 36 OpenID SSO 39 Using in-house private Gerrit authentication(LDAP) 41 LDAP configuration steps 41 Read- only LdaP user profile Active Directory 44 Third-party authentication options 45 ExamPle-apache Http frontend 46 Setting up Gerrit behind a reverse proxy 46 Enabling Gerrit Http authentication 47 User profile lookup 47 Summary 48 Chapter 4: Ssh and Https Access 49 Enabling strong security on Gerrit 49 Installing Bouncy Castle Security 50 Using ssh with Gerrit 51 Git/SSH Client keys 51 Adding SSH keys to a Gerrit user profile 52 Cloning a repo over Git/SSH 53 Enablinghttps 55 Http/s reverse-proxy to Gerrit 55 Http/s Support in Gerrit 57 Summary 58 Chapter 5: Editing Your Project Permissions 59 Understanding the Gerrit permission scheme 59 Configuring project permissions 60 All-Projects permissions 61 Git and gerrit references 62 Git permissions 62 Code Review permissions 63 Table of Contents Managing groups 64 Custom internal groups 65 External groups(group backends 66 Using group hierarchy effectively Organizing project security templates 68 Summar 70 Chapter 6: Changes and Code Review Workflow 71 Gerrit Code review roles and workflow Review workflow step-by-step Roles overview Workflow in ten steps 73 Gerrit branch namespace for code review 74 Setting topics 76 Adding reviewers 76 Review labels Review 78 Commenting and scoring changes 78 Review etiquette 79 Publish review and scoring 80 Amending code under review 81 Summary 83 Chapter 7: Submit Types and Concurrency 85 Submit types 85 Fast forward only 86 Rebase if necessary 86 Merge if necessary always merge Che k 88 Concurrent code reviews 89 Changes dependency tracking 89 Real-life change dependencies with Gerrit 90 Navigating through the gerrit change dependency graph 92 Managing change graph updates 93 Summary 94 Appendix A: Using Gerrit with GitHub 95 Github workflow 95 GitHub controversy 96 Github authentication 96 Building the gitHub plugin 97 Installing GitHub OAuth library 98 Installing GitHub plugin 98 【实例截图】
【核心代码】
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论