Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Task 01 - Set up a GitHub repository (10 minutes)

Introduction

Version control is typically one of the first components that teams implement as they start on projects. Version control is also one of the oldest and most well understood components of DevOps. Version control systems allow developers to collaborate and simultaneously contribute to the same codebase. They can also help teams track versions–so code can be rolled back if bad changes are made–as well as bugs, work items, and test results. If necessary, please take a moment to review the Git handbook to understand the basics of version control, focusing on the distributed version control technology Git.

Description

In this task, you will ensure that you have a GitHub repository set up with the Munson’s Pickles and Preserves Team Messaging System application code in it. The MP&P development team has provided us a simple version of an internal messaging system they use. This .NET 6 application is the one they would like to use for a DevOps proof of concept. They have also provided a Bicep template for creating Azure resources.

The key tasks are as follows:

  1. Fork the starter GitHub repository to your GitHub account.
  2. Clone your new repository to your Dev Box.

Success Criteria

  • You have a repository cloned to your local machine and synchronized with GitHub.com.
  • The Application and InfrastructureAsCode folders are at the root of your repository.

Learning Resources

Tips

  • For a concise explanation of adding files to a repository via the command line, see here.
  • To see how it’s done in the GitHub portal, check here.

Solution

Expand this section to view the solution
  • To fork a repository, perform the following steps:
    • Navigate to the repository URL in your browser and then select the “Fork” button. You must be logged into GitHub on your device before forking the repository.

      Fork a repository

    • Select your account as the owner and keep the repository name the same. Then, choose Create fork to complete the process.

      Create a new fork

  • To clone a repository via command line, run git clone $URL in the directory into which you wish to copy the repository. In order to get the value for URL, perform the following steps:
    • Navigate to your repository in GitHub.
    • Select the green button labeled “<> Code”.
    • In the Clone section of the Local tab, select the copy button to get the URL.