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)

Chapter 1: Introducing Version Control

Activity 1: Repository Creation

You have been instructed to build an application that enables its users to order food from a restaurant and have it delivered. To commence this task, you need to build the application while leveraging version control. You need to create a repository that will host the application. This repository will be used to track task completion and the deployment of the application.

The aim of this chapter is to create a repository in GitHub.

To get started, you need to have the Git command-line tool installed on your computer. Then, you need to have an account on https://github.com/, and you should be logged into it:

  1. Launch the terminal.

    a. On a Linux computer: Press Ctrl + Alt + T.

    b. On a macOS computer: Press ⌘ + spacebar, Type Terminal or iTerm, and then click the application logo to launch the terminal:

    Figure 1.72: Launching a terminal on macOS

    c. On a Microsoft Windows computer: Press Win + R on...