開源日報 每天推薦一個 GitHub 優質開源項目和一篇精選英文科技或編程文章原文,堅持閱讀《開源日報》,保持每日學習的好習慣。
今日推薦開源項目:《貓貓 random-cat-generator》
今日推薦英文原文:《Git: No Control Without Version Control》

今日推薦開源項目:《貓貓 random-cat-generator》傳送門:GitHub鏈接
推薦理由:只要按一下,這個項目就會找出一張貓圖給你。沒有人能夠拒絕可愛貓貓的誘惑的,步驟方便簡單,作為放鬆和轉換心情的選擇來說相當適合。如果平時附近看不到有人養貓的話,這個項目也剛好能很好的幫你補充貓元素。
今日推薦英文原文:《Git: No Control Without Version Control》作者:Kudzanayi Dzvairo
原文鏈接:https://medium.com/@kudzanayi/no-control-without-version-control-3358c38d404c
推薦理由:版本控制系統的重要性——不得不承認這玩意的確很重要,特別是在出了岔子的時候

Git: No Control Without Version Control

I』ll be writing a few blogs on git and some of its features as it was something I googled often working with partners on projects when I began coding. But before diving into git…

What is Version Control

Version control systems allow software teams to manage changes to source code over time. Version control software keeps track of every change over time in a special database. This allows developers the opportunity to turn back time and fix mistakes and make comparisons with the least amount of distraction the team.

As developers code is the most important asset to a team and has been composed carefully. Version control protects source code from both deliberate and unintentional mistakes.

Developers work in teams and are continually updating old code and writing new code. The code for a project, app or software is organized in a folder called structure called a 『file tree』. This allows developers to work on multiple things at once. One may be working on a new feature while another fixes a bug

Version control helps teams solve these kinds of problems, tracking every individual change by each team member and helping prevent concurrent work from conflicting. Changes made in one part of the software can be incompatible with those made by another developer working at the same time. This problem should be discovered and solved without blocking the work of the rest of the team. On top of that change can introduce new bugs on its own and new software can』t be trusted until it』s tested. So testing and development proceed together until a new version is ready.

Good version control software supports a developer』s preferred workflow without imposing one particular way of working. Ideally it also works on any platform, rather than dictate what operating system or tool chain developers must use. Great version control systems facilitate a smooth and continuous flow of changes to the code rather than the frustrating and clumsy mechanism of file locking — giving the green light to one developer at the expense of blocking the progress of others.

Benefits of Version Control

Developing software without using version control is risky, like not having backups. Version control can also enable developers to move faster and it allows software teams to preserve efficiency and agility as the team scales to include more developers.
  1. A complete long-term change history of every file. This means every change made by many individuals over the years. Changes include the creation and deletion of files as well as edits to their contents. This history should also include the author, date and written notes on the purpose of each change. Having the complete history enables going back to previous versions to help in root cause analysis for bugs and it is crucial when needing to fix problems in older versions of software. If the software is being actively worked on, almost everything can be considered an 「older version」 of the software.
  2. Branching and merging. Having team members work at the same time is a no-brainer, but even individuals working on their own can benefit from the ability to work on independent streams of changes. Creating a 「branch」 in VCS tools keeps multiple streams of work independent from each other while also providing the facility to merge that work back together, enabling developers to verify that the changes on each branch do not conflict. Many software teams adopt a practice of branching for each feature or perhaps branching for each release, or both. There are many different workflows that teams can choose from when they decide how to make use of branching and merging facilities in VCS.
  3. Traceability. Being able to trace each change made to the software and connect it to project management and bug tracking software such as Jira, and being able to annotate each change with a message describing the purpose and intent of the change can help with root cause analysis. Having the annotated history of the code at your fingertips when you are reading the code, trying to understand what it is doing and why it is so designed can enable developers to make correct and harmonious changes that are in accord with the intended long-term design of the system. This can be especially important for working effectively with legacy code and is crucial in enabling developers to estimate future work with any accuracy.

下載開源日報APP:https://openingsource.org/2579/
加入我們:https://openingsource.org/about/join/
關注我們:https://openingsource.org/about/love/