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)

Utilizing Workflows

Workflows refer to the approach a team takes to introduce changes to a code base. A workflow is characterized by a distinct approach in the use of branches, or lack thereof, to introduce changes into a repository.

Gitflow Workflow

This uses two branches: master and develop. The master branch is used to track the release history, while the develop branch is used to track feature integration into the product.

To introduce a feature, first, you must create a feature branch from the develop branch and then make changes in the created branch and commit those changes. Next, you should push the changes to the remote feature branch. Additionally, you must raise a pull request against the develop branch, and then follow up by resolving the feedback provided in the pull request. Afterward, merge the feature branch to the develop branch and create a release branch once an agreed number of features are merged to develop. Next, you should raise a pull request against...