- Embedded Systems Architecture
- Daniele Lacamera
- 388字
- 2021-06-25 21:55:04
Revision control
No matter whether you are working alone or in a large development team, properly keeping track of the development progress is extremely important. Revision control tools allows developers to roll back failed experiments at any time with the press of a button, and visiting its history gives a clear view on how the project is evolving at any time.
A revision control system, also known as version control system, or VCS, encourages cooperation by making merge operations easier. The most updated official version is referred to as a trunk or master branch, depending on the VCS in use.
One of the most modern and widely used open source VCSs is Git. Originally created as the VCS for the Linux kernel, Git offers a range of features, but most importantly provides a flexible mechanism to allow switching among different versions and feature branches quickly and reliably, and facilitates the integration of conflicting modifications in the code. Git terminology is used in this book when describing specific activities related to the VCS.
A commit is a VCS action that results in a new version of the repository. The repository keeps track of the sequence of commits and the changes introduced on each version, in a hierarchical structure. A linear sequence of commits is a branch. The latest version in a branch is called HEAD.
Git refers to the main development branch as master. The master branch is the main focus of the development. Bug fixes and minor changes are committed directly on the master. Feature branches are created for self-contained tasks in progressing and ongoing experiments, which will be eventually merged into the master. When not abused, feature branches are a perfect fit when working in a smaller sub-team on a task, and can simplify the code review process, reducing it to validating completed tasks as single merge requests.
A merge operation consists of joining together two versions from two different branches that may have perged and present conflict in the code through the development. Some merges are trivial and automatically resolved by the VCS, while others may require manual fixing.
Using meaningful and verbose commit messages improves the readability of the history of the repository, and can help to track regressions later on. Tags can be used to track intermediate versions that are released and distributed.
- Citrix XenApp Performance Essentials
- Linux操作系統基礎
- Linux系統架構與運維實戰
- 鴻蒙生態:開啟萬物互聯的智慧新時代
- 操作系統基礎與實踐:基于openEuler平臺
- Implementing Azure DevOps Solutions
- Linux運維最佳實踐
- Linux使用和管理指南:從云原生到可觀測性
- Mobile First Design with HTML5 and CSS3
- ElasticSearch Cookbook
- Java EE 8 High Performance
- 每天5分鐘玩轉Docker容器技術
- C#實用教程(第2版)
- 不可不知的Windows技巧
- OpenStack Trove Essentials