The Authoritative Guide to Git cover

The Authoritative Guide to Git

Rating 4.0
Series
HZ Books · Hands-On Technology Series
ISBN
9787111349679

Tags

Summary

The Authoritative Guide to Git is a technical monograph by Jiang Xin that systematically explains Git. Published by China Machine Press in 2011, it runs to 595 pages and is divided into 9 parts, 41 chapters, and 4 appendices; readers regard it as an "encyclopedia" of Git. Part 1 traces the evolution of version-control tools, explains Git's advantages as a distributed version-control system, and gives installation and initial configuration methods for Linux, Mac OS X, and Windows. Parts 2 and 3 are the foundation of the book: the former is aimed at individual users and covers Git initialization, everyday commits, the staging area, the object model, reset, checkout, saving progress, viewing and changing history, cloning, and local repository management; the latter turns to team collaboration and covers the transport protocols Git supports, conflict resolution, milestones (tags), branching models, remote repositories, and exchanging patch files. Part 4 discusses collaboration patterns in actual work, including the classic centralized and integration collaboration models, Topgit, submodules, subtree merging, Android multi-repository collaboration, and schemes for using Git alongside SVN. Part 5 moves to the server side, explaining the use of HTTP, Git, and SSH protocols, as well as setting up and hosting repositories with services such as Gitolite, Gitosis, and Gerrit. Part 6 focuses on repository migration, covering paths for migrating from CVS, SVN, and Hg to Git and repository cleanup. Part 7 introduces peripheral applications such as etckeeper and Gistore, binary files in patches, and cloud storage; Part 8 covers advanced features such as cross-platform operation, hooks and templates, sparse checkout and shallow cloning, and grafting and replacement. The book balances command operations with underlying principles, and its examples are close to real engineering scenarios; it is suitable for developers who want to move from "knowing how to use" Git to "understanding" it.

Editor's review

很多 Git 书教你把命令敲对,这本书还告诉你命令背后发生了什么。蒋鑫以 9 篇 41 章的体量,把 Git 从安装配置、对象与暂存区原理,一路讲到分支策略、协同模型、服务器架设、版本库迁移和钩子、替换对象等底层特性,结构上近似一部可查阅的手册,也足够支撑从头精读。它的价值在于“全”和“深”的结合:既有面向个人开发者的日常操作路径,也把团队协作中真正棘手的问题——冲突处理、多版本库协同、从 SVN 渐进迁移——单独成篇讨论。书中的不少场景(Topgit、Android 多版本库协同、Gitolite 与 Gerrit 部署)来自作者的一线实践,对需要搭建或治理研发基础设施的人尤其有用。需要提醒的是,本书成书于 2011 年,示例围绕当时的 Git 版本与工具链展开,某些命令选项与第三方工具已发生变化;阅读时宜配合官方文档与现代 Git 版本实践,把书当作理解原理与工作流的地图,而非最新版命令速查表。

Who it's for

A good fit for

  • 已经会用 add、commit、push,但想搞懂暂存区、对象与分支本质的开发者
  • 需要为团队设计分支策略、协同流程与代码评审规范的研发负责人
  • 负责搭建 Git 服务器、迁移 SVN/CVS 版本库的运维与配置管理人员
  • 希望系统整理 Git 知识、把零散经验补成体系的工程师

Not a good fit for

  • 完全没接触过版本控制、需要当天上手提交代码的零基础读者
  • 只想查最新 Git 命令选项、需要紧跟当前版本变化的读者
  • 以图形化客户端办公为主、不打算了解命令行与底层机制的产品或设计人员

Reading tips

  1. 初读可只精读第 1—3 篇,打牢对象模型、暂存区与分支概念,再按需翻阅后面各篇。
  2. 把书中示例在自己机器上重做一遍,用 git log、git cat-file、git reflog 观察每一步的实际状态。
  3. 涉及服务器架设与迁移的章节,建议先在虚拟机或测试仓库中验证,再用于生产环境。
  4. 遇到与当前 Git 版本不一致的命令或工具时,以官方文档为准,把书当作原理与工作流的参考。
  5. 可作为案头手册长期查阅,每遇到分支管理或历史整理难题时回看对应篇章。

About the publisher

China Machine Press China · Founded in 1950

In addition to science and technology and professional publishing, the books in our catalog from China Machine Press also reflect a sustained focus on psychology, computing, management, finance and economics, and social sciences. In psychology, the catalog includes works by C. G. Jung and introductions to analytical psychology, as well as applied topics such as stress and health, and addiction and healing. In computing, it features Structure and Interpretation of Computer Programs (JavaScript Edition). Management and finance titles include Administrative Behavior (4th Edition), The Price of Inequality (Collector's Edition), and This Time Is Different: Eight Centuries of Financial Folly (Commemorative Edition). In the philosophy and history of science, there is The Worldview: The Third Edition. Relevant authors include C. G. Jung, William McGuire, Sonu Shamdasani, and Gabor Maté. Public information is limited; the above summarizes the publisher's profile based solely on the books in our catalog.

FAQ

这本书适合 Git 零基础的读者吗?
不太适合作为第一本书。书中第 2 篇虽然从初始化讲起,但很快进入对象、暂存区等原理性内容,篇幅厚重。建议先用一份入门教程完成基本提交与推送,再回来读本书理解机制。
书中的内容现在会不会过时?
本书出版于 2011 年,部分命令选项与第三方工具(如某些服务器软件、协同工具)已有变化。关于 Git 对象模型、分支与合并原理、协同思路的内容依然成立;具体操作请对照官方文档与当前 Git 版本验证。
这本书和《Pro Git》有什么区别?
《Pro Git》由 Git 社区作者撰写,覆盖通用原理与用法;本书由中文作者撰写,更偏重中文读者的实际工程场景,专门用大量篇幅讨论国内团队常见的协同模型、SVN 迁移、自建服务器与版本库治理,可作为前者的场景化补充。
零散章节可以跳读吗?
可以。全书按篇组织,第 1—3 篇是基础主线,建议顺序阅读;第 4—8 篇相对独立,可按当前需求选读,比如正在做 SVN 迁移就直接看第 6 篇。
需要边读边敲命令吗?
强烈建议。Git 的概念只有亲手操作才容易建立直觉,建议准备一个练习仓库,边读边执行并观察 .git 目录与提交历史的变化。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

More by the same author

Top rated in the same category