Book Image

Version Control with Git and GitHub

By : Alex Magana, Joseph Muli
Book Image

Version Control with Git and GitHub

By: Alex Magana, Joseph Muli

Overview of this book

<p>Introduction to Git and GitHub begins with setting up and configuring Git on your computer along with creating a repository and using it for exercises throughout the book. With the help of multiple activities, you’ll learn concepts that show various stages of a file—from when it is untracked to when it is set for tracking under version control. As you make your way through the chapters, you’ll learn to navigate through the history of a repository, fetch and deliver code to GitHub, and undo code changes. </p><p> </p><p>The first half of the book ends with you learning to work with branches, storing and retrieving changes temporarily, and merging the desired changes into a repository. </p><p> </p><p>In the second half, you’ll learn about forking as part of a collaborative workflow. You’ll also address modularity and duplication through submodules, tracing and rectifying faulty changes, and maintaining repositories. </p><p> </p><p>By the end of this book, you will have learned how to effectively deploy applications using GitHub.</p>
Table of Contents (8 chapters)

Introduction

This chapter will cover the basic concepts of version control, using illustrative examples. This book draws attention to the facets that make up version control, thus encompassing tracking of code base changes, how to host a code base to support remote access, managing contributors and contributions, and best practices to adhere to. By implementing version control, the creation and enforcement of team-driven checks and controls for introduction, scrutiny, approval, merging, and the reversal of changes, when the occasion necessitates, can be realized.

Version control alludes to the tracking and traceability of changes. It is, in a way, akin to the use of a bookmark, to mark the point to return to when the reader wants to continue reading. In version control, this metaphorical bookmark marks a reference to a snapshot of the code base. This snapshot indicates the state of the product or the code base at a given point.

To appreciate version control and—more so—Git, we need to consider what nature software development takes when it's void of version control and, by extension, distributed version control that's provided by Git.

In the case of development without employing version control, the handling of code and making changes to the same code translates to a chaotic environment where changes to a code base are uncoordinated. No information exists to track changes to a file, apart from the metadata that is offered by the operating system that you are working from, and an archiving approach where file naming is used to refer to different snapshots of a code base.

The result of this is derailed and delayed changes. This is due to the overhead of requiring the development team to constantly physically investigate files to integrate changes successfully, as well as the resources spent in rectifying incorrect integrations that result in unintended and unforeseen bugs in the production environment.