Git用户介绍书.doc
《Git用户介绍书.doc》由会员分享,可在线阅读,更多相关《Git用户介绍书.doc(143页珍藏版)》请在得力文库 - 分享文档赚钱的网站上搜索。
1、| Git 用户手册(1.5.3 及后续版 本适用) 翻译: 罗峥嵘 (Robin Steven) 英文版本: http:/www.kernel.org/pub/software/scm/git/docs/user- manual.html Contents 1. Preface 前言 2. Chapter 1. Repositories and Branches 第一章. 版本库与分支 1. How to get a git repository 如何获取一个版本库 2. How to check out a different version of a project 如何提取项目的不同版
2、本 3. Understanding History: Commits 理解历史: 交付 1. Understanding history: commits, parents, and reachability 交付,父交付与可及性 2. Understanding history: History diagrams 历史沿革示图 3. Understanding history: What is a branch? 理解历史:什么是分支 4. Manipulating branches 操作分支 5. Examining an old version without creating a n
3、ew branch 不通过创建新分支来调查旧版本 6. Examining branches from a remote repository 调查远程版本库上的分支 7. Naming branches, tags, and other references 命名分支,标签,与其他引用 8. Updating a repository with git-fetch 用 git fetch 更新版本库 9. Fetching branches from other repositories 获取其他版本库的分支 3. Chapter 2. Exploring git history 第二章.
4、检索 git 历史 1. How to use bisect to find a regression 如何用平分来定位撤退 2. Naming commits 交付的称谓 3. Creating tags 创建标签 4. Browsing revisions 浏览修订 5. Generating diffs 生成差异 6. Viewing old file versions 查看旧的文件版本 7. Examples 实例 1. Counting the number of commits on a branch 统计一个分支中的交付数目 2. Check whether two branch
5、es point at the same history 检查两分支是否在同一历史时期 3. Find first tagged version including a given fix 找到包含给定修正的第一个标签版本 4. Showing commits unique to a given branch 显示仅属于某个分支的交付 5. Creating a changelog and tarball for a software release 为软件的发行制作变更日志和压缩包 6. Finding commits referencing a file with given conten
6、t 寻找一个指向包含给定内容的文件的交 付 4. Chapter 3. Developing with git 第三章. 用 git 进行研发 1. Telling git your name 告诉 git 你的名字 2. Creating a new repository 创建新的版本库 3. How to make a commit 如何制作一个交付 4. Creating good commit messages 写好交付信息 5. Ignoring files 忽略文件 6. How to merge 如何合并 7. Resolving a merge 解决合并冲突 |1. Getti
7、ng conflict-resolution help during a merge 在合并过程中取得冲突解决帮助 8. Undoing a merge 撤销合并 9. Fast-forward merges 快进合并 10. Fixing mistakes 修复失误 1. Fixing a mistake with a new commit 修复一个新的交付中的失误 11. Fixing a mistake by rewriting history 通过重写历史来修复失误 12. Checking out an old version of a file 提取一个文件的旧版本 13. Tem
8、porarily setting aside work in progress 临时放下手头上的工作 14. Ensuring good performance 确保好的性能 15. Ensuring reliability 确保伸缩性 1. Checking the repository for corruption 检查版本的损坏 2. Recovering lost changes 恢复丢失的变更 5. Chapter 4. Sharing development with others 第四章. 与他人协同研发 1. Getting updates with git-pull 用 gi
9、t-pull 取得更新 2. Submitting patches to a project 向项目提交补丁 3. Importing patches to a project 给项目导入补丁 4. Public git repositories 发布 git 版本库 5. Setting up a public repository 建立一个公共版本库 6. Exporting a git repository via the git protocol 通过 git 协议公开版本库 7. Exporting a git repository via http 通过 http 协议公开版本库
10、8. Pushing changes to a public repository 将变更推入到公共版本库 9. What to do when a push fails 推入失败之后该怎么处理 10. Setting up a shared repository 建立共享版本库 11. Allowing web browsing of a repository 容许 Web 浏览版本库 12. Examples 例子 1. Maintaining topic branches for a Linux subsystem maintainer | Linux 子系统维护者如何维护主 题分支 6
11、. Chapter 5. Rewriting history and maintaining patch series 第五章. 改写历史与维护补丁串 1. Creating the perfect patch series 创建出色的补丁串 2. Keeping a patch series up to date using git-rebase 使用 git-rebase 保持补丁串的新颖 3. Rewriting a single commit 重写单个交付 4. Reordering or selecting from a patch series 在补丁串中选取与重新排序 5. Ot
12、her tools 第三方工具 6. Problems with rewriting history 重写历史带来的问题 7. Why bisecting merge commits can be harder than bisecting linear history 为何定位合并交付中的 问题要比在线性历史中困难 7. Chapter 6. Advanced branch management 第六章. 高级分支管理 1. Fetching individual branches 2. git fetch and fast-forwards 抓取与快进 3. Configuring rem
13、ote branches 配置远程分支 8. Chapter 7. Git concepts 第七章. Git 概念 1. The Object Database 对象数据库 1. Commit Object 交付对象 2. Tree Object 树对象 3. Blob Object 片对象 4. Trust 信赖 5. Tag Object 标签对象 6. How git stores objects efficiently: pack files | git 如何高效地储存对象: 打包文件 7. Dangling objects 悬空对象 8. Recovering from repos
14、itory corruption 从损坏中恢复 2. The index 索引 9. Chapter 8. Submodules 子模块 |1. 1. Pitfalls with submodules 子模块陷阱 10. Chapter 9. Low-level git operations 第九章. 底层 git 操作 1. Object access and manipulation 对象访问与操作 2. The Workflow 运作流程 1. working directory - index 工作树 - 索引 2. index - object database 索引 - 对象数据库
15、 3. object database - index 对象数据库 - 索引 4. index - working directory 索引 - 工作目录 5. Tying it all together 全盘了解 3. Examining the data 检验数据 4. Merging multiple trees 合并多个树 5. Merging multiple trees, continued 合并多个树,续完 11. Chapter 10. Hacking git 第十章. git 的开发 1. Object storage format 对象的存储格式 2. A birds-ey
16、e view of Gits source code 鸟瞰 git 源代码 12. Chapter 11. GIT Glossary 第十一章. GIT 字典 13. Appendix A. Git Quick Reference 附录 A. Git 快速参考 1. Creating a new repository 创建一个新的版本库 2. Managing branches 管理分支 3. Exploring history 勘查历史 4. Making changes 制作变更 5. Merging 合并 6. Sharing your changes 共享你的变更 7. Reposit
17、ory maintenance 版本库的维护 8. Appendix B. Notes and todo list for this manual 附录 B. 备忘与本手册的工作计划 Preface 前言 Git is a fast distributed revision control system. Git 是一个快速的分布式版本控制系统 This manual is designed to be readable by someone with basic UNIX command-line skills, but no previous knowledge of git. 这个手册是
18、面向那些具有基本的 Unix 命令行使用技能,但是没有 Git 知识的人设 计的。 Chapter 1, Repositories and Branches and Chapter 2, Exploring git history explain how to fetch and study a project using gitread these chapters to learn how to build and test a particular version of a software project, search for regressions, and so on. 第一章
19、版本库与分支 和 第二章 考查 git 历史 将展示如何用 git 来获取和研究一个 项目,通过阅读这些章节,我们学习如何建立和测试一个具体的软件项目的版本, 学习“撤退”等等。 |People needing to do actual development will also want to read Chapter 3, Developing with git and Chapter 4, Sharing development with others. 人们是需要开展真正的研发工作的,那么就学习 第三章, 用 git 进行开发 和 第四 章,与他人共享研发成果。 Further cha
20、pters cover more specialized topics. 更多的一些章节会涉及到许多的专题话题。 Comprehensive reference documentation is available through the man pages, or git- help(1) command. For example, for the command “git clone “, you can either use: 参考文档可以通过系统的手册页命令,或者是 git-help(1) 命令来查看。譬如,你想 参考 “git clone “, 你可以用下面的两种方式: $ man
21、git-clone or: 或者: $ git help clone With the latter, you can use the manual viewer of your choice; see git-help(1) for more information. 晚一点你就有机会用到这些手册查看器的;看 git-help(1) 会得到比较多的信息。 See also Appendix A, Git Quick Reference for a brief overview of git commands, without any explanation. 阅读 附录 A,那里是一个 gi
22、t 命令的快速纵览,但是它不带任何的解说。 Finally, see Appendix B, Notes and todo list for this manual for ways that you can help make this manual more complete. 最后,看看 附录 B,这份手册的工作备忘和计划,通过它你可以帮助这份文档变 得更完善。 Chapter 1. Repositories and Branches 第 一章. 版本库与分支|How to get a git repository 如何获取一个版本库 It will be useful to have
23、a git repository to experiment with as you read this manual. 有一个实验性的 git 版本库对我们阅读这份手册将非常有用。 The best way to get one is by using the git-clone(1) command to download a copy of an existing repository. If you dont already have a project in mind, here are some interesting examples: 获取一个已经存在的版本库,最佳的方法是用
24、git-clone 命令,如果你还没有什么 心目中的项目的话,那么这里有些有趣的例子: # git itself (approx. 10MB download): $ git clone git:/git.kernel.org/pub/scm/git/git.git# the Linux kernel (approx. 150MB download): $ git clone git:/git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git The initial clone may be time-consuming fo
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Git 用户 介绍书
限制150内