官术网_书友最值得收藏!

An introduction to version control and Git

A version control system (sometimes called revision control) is a tool that lets you track the history and attribution of your project files over time (stored in a repository), and which helps the developers in the team to work together. Modern version control systems help them work simultaneously, in a non-blocking way, by giving each developer his or her own sandbox, preventing their work in progress from conflicting, and all the while providing a mechanism to merge changes and synchronize work.

Distributed version control systems such as Git give each developer his or her own copy of the project's history, a clone of a repository. This is what makes Git fast: nearly all operations are performed locally, and are flexible: you can set up repositories in many ways. Repositories meant for developing also provide a separate working area (or a worktree) with project files for each developer. The branching model used by Git enables cheap local branching and flexible branch publishing, allowing to use branches for context switching and for sandboxing different works in progress (making possible, among other things, a very flexible topic branch workflow).

The fact that the whole history is accessible allows for long-term undo, rewinding back to last working version, and so on. Tracking ownership of changes automatically makes it possible to find out who was responsible for any given area of code, and when each change was done. You can compare different revisions, go back to the revision a user is sending a bug report against, and even automatically find out which revision introduced a regression bug. The fact that Git is tracking changes to the tips of branches with reflog allows for easy undo and recovery.

A unique feature of Git is that it enables explicit access to the staging area for creating commits (new revisions of a project). This brings additional flexibility to managing your working area and deciding on the shape of a future commit.

All this flexibility and power comes at a cost. It is not easy to master using Git, even though it is quite easy to learn its basic use. This book will help you attain this expertise, but let's start with a reminder about basics with Git.

主站蜘蛛池模板: 寻乌县| 济阳县| 深圳市| 嘉峪关市| 怀远县| 晋江市| 平和县| 阳新县| 孟津县| 陆河县| 建瓯市| 绥棱县| 泰来县| 长丰县| 杨浦区| 怀柔区| 杨浦区| 正宁县| 鸡西市| 怀柔区| 玉溪市| 沂南县| 沅江市| 上饶市| 杭锦旗| 甘谷县| 东方市| 阿拉善盟| 岳西县| 宁强县| 尤溪县| 威信县| 根河市| 肥东县| 武鸣县| 乐都县| 苏尼特右旗| 日土县| 盖州市| 隆安县| 从江县|