- Mastering Git
- Jakub Nar?bski
- 376字
- 2021-07-09 19:37:27
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.
- 數據庫程序員面試筆試真題與解析
- 認識編程:以Python語言講透編程的本質
- 秒懂設計模式
- Lua程序設計(第4版)
- INSTANT OpenNMS Starter
- C語言開發基礎教程(Dev-C++)(第2版)
- Visual Basic程序設計教程
- 軟件項目管理實用教程
- Java 從入門到項目實踐(超值版)
- OpenCV 3計算機視覺:Python語言實現(原書第2版)
- 從0到1:HTML5 Canvas動畫開發
- Exploring SE for Android
- Laravel Design Patterns and Best Practices
- C語言程序設計實驗指導教程
- Android Application Programming with OpenCV 3