M3_GitHub_Git
M3_GitHub_Git
M3_GitHub_Git
md 4/15/2023
Lab Guides
Conditions and Terms of Use
Microsoft Confidential
This training package is proprietary and confidential, and is intended only for uses described in the training
materials. Content and software is provided to you under a Non-Disclosure Agreement and cannot be
distributed. Copying or disclosing all or any portion of the content and/or software included in such packages
is strictly prohibited.
The contents of this package are for informational and training purposes only and are provided as is without
warranty of any kind, whether express or implied, including but not limited to the implied warranties of
merchantability, fitness for a particular purpose, and non-infringement.
Training package content, including URLs and other Internet Web site references, is subject to change without
notice. Because Microsoft must respond to changing market conditions, the content should not be
interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any
information presented after the date of publication. Unless otherwise noted, the companies, organizations,
products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious,
and no association with any real company, organization, product, domain name, e-mail address, logo, person,
place, or event is intended or should be inferred.
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights
covering subject matter in this document. Except as expressly provided in written license agreement from
Microsoft, the furnishing of this document does not give you any license to these patents, trademarks,
copyrights, or other intellectual property.
Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under
copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or
transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or
for any purpose, without the express written permission of Microsoft Corporation.
http://www.microsoft.com/en-us/legal/intellectualproperty/Permissions/default.aspx
DirectX, Hyper-V, Internet Explorer, Microsoft, Outlook, OneDrive, SQL Server, Windows, Microsoft Azure,
Windows PowerShell, Windows Server, Windows Vista, and Zune are either registered trademarks or
trademarks of Microsoft Corporation in the United States and/or other countries. Other Microsoft products
mentioned herein may be either registered trademarks or trademarks of Microsoft Corporation in the United
States and/or other countries. All other trademarks are property of their respective owners.
1 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
Introduction
A Git repository, or repo, is a folder that you've told Git to help you track file changes in. You can have any
number of repos on your computer, each stored in their own folder. Each Git repo on your system is
independent, so changes saved in one Git repo don't affect the contents of another.
A Git repo contains every version of every file saved in the repo. Git saves these files very efficiently, so having
a large number of versions doesn't mean that it uses a lot of disk space. Storing each version of your files
helps Git merge code better and makes working with multiple versions of your code quick and easy.
You can create Git repos in team projects to manage your project’s source code. Each Git repo has its own set
of permissions and branches to isolate itself from other work in your project.
A fork is a complete copy of a repository, including all files, commits, and (optionally) branches. Forks are a
great way to support an Inner Source workflow: you can create a fork to suggest changes to a project when
you don't have permissions to write to the original project directly. Once you're ready to share those changes,
it's easy to contribute them back using pull requests.
Objectives
Clone a repository
Stage, commit, and sync changes
Review history
Manage branches using Visual Studio Code and GitHub
Create and manage pull requests
Create, manage, and delete repositories
Prerequisites
This lab requires you to complete Exercise 1 of the previous PartsUnlimited Lab Setup lab.
2 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
VS Code with C# and Git for Windows is already installed on your VM. You will be installing the
Pull Request extension in the first exercise of this lab
60 minutes
3 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
Module 3 (Alternative): Git with GitHub, Lab 1: Getting Started with Git, Exercise 1: Configuring the lab
Environment
In this exercise you will create and configure a GitHub account. You will also configure Visual Studio Code to
ensure it has all the required components and that it can communicate with GitHub.
Prerequisites
None
Tasks
4 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
Module 3 (Alternative): Git with GitHub, Lab 1: Getting Started with Git, Exercise 1: Configuring the lab
Environment
5 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
3. On the screen that asks you to enter the code sent to your email ID, click update your email address.
Enter the code and setup your GitHub account.
4. Click on the GitHub home by clicking on the top-left of the page or navigating to https://github.com
5. Click on Import repository. We will clone the PartsUnlimited repository from Azure DevOps here.
6 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
6. Switch to the Azure DevOps tab in the browser and navigate to the PartsUnlimited project (if not
open already, open a new tab and navigate to https://dev.azure.com/AppInnovation-
[YourName]/PartsUnlimited)
7 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
9. Switch back to the GitHub tab and paste the copied URL under old repository's clone URL. Enter the
new Repository Name as PartsUnlimited. Select the Privacy as Private anc click Begin import.
10. When it asks for a Login and Password, switch back to Azure DevOps tab that has PartsUnlimited -
Repos open. Fron the Clone option, click on Generate Git Credentials. Copy the Username and
8 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
Password one by one and paste it into the GitHub Login and Password respectively. On the GitHub
page, click on Submit.
11. In a few seconds the import will complete and you can navigate to the PartsUnlimited repository in
GitHub. For rest of this lab we will use this PartsUnlimited repo in GitHub.
9 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
10 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
Module 3 (Alternative): Git with GitHub, Lab 1: Getting Started with Git, Exercise 1: Configuring the lab
Environment
1. You will be using Visual Studio Code as a local client to interact with GitHub. Open Visual Studio Code
by clicking on the VS Code icon in the taskbar.
2. Review the Activity bar on the left side in the VS Code to see if it has any GitHub related extensions. At
this time, you may not have any GitHub extensions. Click on Extensions.
11 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
3. Search for GitHub Pull Request and Issues extension and install it.
4. Check in the Activity bar that you see the GitHub extension now.
12 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
13 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
Module 3 (Alternative): Git with GitHub, Lab 1: Getting Started with Git, Exercise 1: Configuring the lab
Environment
In this task, you will configure a Git credential helper to securely store the Git credentials used to
communicate with Azure DevOps. If you have already configured a credential helper and Git identity,
you can skip to the next task.
1. In the Visual Studio Code, from the main menu select Terminal | New Terminal to open a terminal
window.
3. The commands below will configure your user name and email for Git commits. You can replace the
parameters with your preferred user name and email and execute them.
14 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
Module 3 (Alternative): Git with GitHub, Lab 1: Getting Started with Git, Exercise 1: Configuring the lab
Environment
1. Navigate to GitHub in the browser to the PartsUnlimited repo. The URL would be
https://github.com/[username]/PartsUnlimited.
4. Press Ctrl+Shift+P to show the Command Palette. Alternatively, you can open the Command Palette
by navigating to View -> Command Palette.
The Command Palette provides an easy and convenient way to access a wide variety of tasks,
including those provided by 3rd party extensions.
5. Execute the Git: Clone command. It may help to type “Git” to bring it to the shortlist.
15 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
7. Navigate to the local path C:\Users\StudentPC\source\repos and create PartsUnlimited folder and
select this as a Repository Location. Click on Sign in with your browser to connect local Git with
GitHub.
8. In the browser, click on Authorize GitCredentialManager. After entering the password, you will see
the Authentication secceeded message. Back in the Visual Studio Code, click on Open to open the
clones repository.
16 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
17 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
Module 3 (Alternative): Git with GitHub, Lab 1: Getting Started with Git, Exercise 2: Saving work with
Commits
In this exercise, you will learn how to change code in a Git repository.
When you make changes to your files, Git will record the changes in the local repository. You can select the
changes that you want to commit by staging the changes. Commits are always made against your local Git
repository, so you don’t have to worry about the commit being perfect or ready to share with others. You can
make more commits as you continue to work and push the changes to others when they are ready to be
shared.
What’s in a commit?
The file(s) changed in the commit. Git keeps the contents of all file changes in your repo in the
commits. This keeps it fast and allows intelligent merging.
A reference to the parent commit(s). Git manages your code history using these references.
A message describing a commit. You give this message to Git when you create the commit. It’s a good
idea to keep this message descriptive, but to the point.
Prerequisites
Complete Exercise 1
Tasks
18 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
Module 3 (Alternative): Git with GitHub, Lab 1: Getting Started with Git, Exercise 2: Saving work with
Commits
1. Go to the Visual Studio Code that has PartsUnlimited project open. From the Explorer tab, open
/PartsUnlimited-aspnet45/src/PartsUnlimitedWebsite/Models/CartItem.cs.
2. Add a comment to the file: //My first change. Press Ctrl+S to save the file. You can also save the file
by navigating to File -> Save
It doesn’t really matter what the comment is and where you add it in the file since the goal is
just to make a change in the file.
19 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
3. Select the Source Control tab to see the one change to the solution.
4. Enter a commit message of My commit and press Ctrl+Enter to commit it locally. Alternatively, you
can click on Commit.
20 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
If asked whether you would like to automatically stage your changes and commit them
directly, click Always. We will discuss staging later in the lab.
5. Click Sync to Push commits to origin/master on the bottom-left of VS Code to synchronize local
repository changes with the server. Confirm the sync if prompted.
Since you have made one commit locally that we need to push to the remote repository, the
sync icon reflects this one change to be uploaded.
21 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
Module 3 (Alternative): Git with GitHub, Lab 1: Getting Started with Git, Exercise 2: Saving work with
Commits
1. Switch to the web browser that has GitHub open. Refresh the page (F5) and you should see My
commit you performed.
2. You can also click on the commits on the right side. This should show list of all the commits.
22 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
Note that all the commits show the person who performed the commit as well as when they
were performed.
23 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
Module 3 (Alternative): Git with GitHub, Lab 1: Getting Started with Git, Exercise 2: Saving work with
Commits
Staging changes allows you to selectively add certain files to a commit while passing over the changes
made in other files.
2. Edit the CartItem.cs file by editing the comment you made earlier and changing it to //My second
change. Save the changes.
3. Click on the Explorer in the left tab of Visual Studio Code and open Category.cs file.
4. Add a new comment to Category.cs file: //My third change so there will be two files with changes.
Save the file.
24 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
5. From the Source Control tab, click the Stage Changes (+) button for CartItem.cs.
25 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
7. Enter a commit message Added comments. From the More Actions dropdown, select Commit
Staged.
8. From More Actions, select Pull, Push -> Sync. This will synchronize changes to the remote repository
in GitHub under PartsUnlimited repo. Since only the staged changes were committed, the other
changes are still pending locally.
26 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
Alternatively, you can also quickly sync changes by clicking the Synchronize Changes at the
bottom-left corner of VS Code.
27 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
Module 3 (Alternative): Git with GitHub, Lab 1: Getting Started with Git, Exercise 2: Saving work with
Commits
Git uses the parent reference information stored in each commit to manage a full history of your
development. You can easily review this commit history to find out when file changes were made and
determine differences between versions of your code.
1. In Visual Studio Code, click on the Source Control tab and then click on Category.cs file.
2. A comparison view is opened to enable you to easily locate the changes you’ve made. In this case, it’s
just the one comment.
3. Go to GitHub in the web browser and click on Added comments commit to view a similar comparison
in this commit.
28 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
4. You can view the changes in the file(s) and also view those in the Split view.
29 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
Module 3 (Alternative): Git with GitHub, Lab 1: Getting Started with Git, Exercise 3: Managing Branches
Committing changes to a branch will not affect other branches, and you can share branches with others
without having to merge the changes into the main project. You can also create new branches to isolate
changes for a feature or a bug fix from your master branch and other work. Since the branches are
lightweight, switching between branches is quick and easy. Git does not create multiple copies of your source
when working with branches, but rather uses the history information stored in commits to recreate the files on
a branch when you start working on it. Your Git workflow should create and use branches for managing
features and bug fixes. The rest of the Git workflow, such as sharing code and reviewing code with pull
requests, all work through branches. Isolating work in branches makes it very simple to change what you are
working on by simply changing your current branch.
Git keeps track of which branch you are working on and makes sure that when you check out a branch your
files match the most recent commit on the branch. Branches let you work with multiple versions of the source
code in the same local Git repository at the same time. You can manage the branches in your Visual Studio
Code.
Prerequisites
Complete Exercise 1.
Tasks
30 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
Module 3 (Alternative): Git with GitHub, Lab 1: Getting Started with Git, Exercise 3: Managing Branches
1. Return to Visual Studio Code and click the master branch from the bottom-left corner.
3. Enter the Branch name as dev for the new branch and press Enter.
4. Select the master as the reference branch to create the dev branch from.
5. Confirm from the bottom-left corner of the Visual Studio Code that are now working in the dev branch.
31 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
32 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
Module 3 (Alternative): Git with GitHub, Lab 1: Getting Started with Git, Exercise 3: Managing Branches
Git keeps track of which branch you are working on and makes sure when you checkout a branch, your
files match the most recent commit on the branch. Branches let you work with multiple versions of the
source code in the same local Git repository at the same time. You can use Visual Studio Code to
publish, check out and delete branches.
2. In the web browser go to GitHub. Refresh the page and click on dropdown with the master branch.
This will show all the branches, including the dev branche created in VS Code.
33 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
3. Click on the dev branch. This checks out the dev branch in GitHub.
Notice that you have the ability to restore the deleted branch. Do not restore the brnach.
7. Note that there are two dev branches listed. The local dev branch is there because it’s not deleted
when the remote branch is deleted. The remote origin/dev is there because it hasn’t been pruned.
8. Select the master branch to check it out. Now you should see master branch checked out at the
bottom-left corner of Visual Studio Code.
34 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
10. Start typing Git: Delete and select Git: Delete Branch... when it becomes visible.
11. There is only one local branch (dev) to delete, so select this dev branch.
12. Click the master branch from bottom-left corner of Visual Studio Code.
Note that the local dev branch is now gone, but the remote origin/dev is still showing.
35 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
14. Start typing Git: Fetch and select Git: Fetch (Prune) when it becomes visible.
This command will update the original branches in the local snapshot and delete those that are
no longer in the remote repository.
15. You can check the Output tab of the Visual Studio Code to view the Git output of the Git: Fetch (Prune)
command. Make sure you have selected Git option from the dropdown to see the Git output.
16. Click the master branch. The origin/dev branch should no longer be in the list.
36 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
Module 3 (Alternative): Git with GitHub, Lab 1: Getting Started with Git, Exercise 3: Managing Branches
This is the view where you can see all the branches in your repository and also rename/delete
the branch if necessary.
3. Click on Code to switch back to the repository with master branch selected.
4. Click on the master and in the dropdown enter release in the search box. As there is not release branch
present, GitHub should let you create it. Click on Create branch: release from 'master'.
37 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
5. After the branch has been created, it will be checked out. It will also be available in the list of branches.
8. Start typing Git: Fetch and select Git: Fetch when it becomes visible. This command will update the
origin branches in the local snapshot.
9. Click the master branch from the bottom-left corner of Visual Studio Code.
10. In the list of branches you should now see origin/release. Click origin/release and this will create a
new local branch called release and check it out.
38 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
Module 3 (Alternative): Git with GitHub, Lab 1: Getting Started with Git, Exercise 4: Working with Pull
Requests in GitHub
Pull requests let your team provide feedback on changes in feature branches before merging the code into
the master branch. Reviewers can step through the proposed changes, leave comments, and vote to approve
or reject the code.
Prerequisites
Complete Exercise 3.
Tasks
39 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
Module 3 (Alternative): Git with GitHub, Lab 1: Getting Started with Git, Exercise 4: Working with Pull
Requests in GitHub
1. Return to Visual Studio Code and confirm that you have release branch selected.
2. Select the Source Control tab. It should recognize that you have uncommitted changes to Category.cs.
3. Enter a commit message Category change and press Ctrl+Enter to commit the change to the local
release branch. You can also commit by clicking the commit button.
4. Click the Synchronize Changes button at the bottom-left corner of the VS Code to push the commit to
the remote repository.
5. Navigate back to the web browser with GitHub open. Refresh the page and you should see and option
for creating the pull request. Click on Compare & pull request.
40 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
6. On this page you can create a pull request by using the default name of the commit as the title. Review
the options to select base and compare branches for the pull request. You can also add reviewer,
asignees, labels, projects, etc. to the PR. Click on Create pull request.
41 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
Module 3 (Alternative): Git with GitHub, Lab 1: Getting Started with Git, Exercise 4: Working with Pull
Requests in GitHub
1. Switch back to Visual Studio Code and click on the GitHub Extension that you installed in the
previous exercise. If required, click on Sign in.
2. Once authorized from GitHub, the GitHub Pull Request extension in Visual Studio Code will start
showing the Pull Request in VS Code as well.
3. Click on the Description of the open pull request to view similar details that you saw in GitHub.
42 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
4. Now switch the Category.cs file while staying inside the Pull Request extension of GitHub. This view
shows side-by-side comparison of the category.cs file. Hover on the right side file to add comment
where you made a change previously.
5. Enter a comment using markdown This is a *great* fix and click Add Comment to save it.
43 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
6. While you can interact with this workflow in VS Code itself, you can also view this in GitHub. Switch
back to the gitHub page. The new comment is tracked as part of the pull request in GitHub too. It’s
expected that every comment will be resolved before a pull request will be completed, so click Resolve
conversation.
7. Select the Files changed tab. This is where you can interact with the existing resolved comment as well
as add more comments if you wished.
44 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
8. Select the Commits tab, where you can review the commits made to the branch.
9. Since everything seems to be in order, click on Conversation again and click on Merge pull request to
merge the pull request and Confirm merge.
10. When the merge completes, the pull request should be marked as Merged.
11. You have the option to delete the release branch. Click on Delete branch.
12. Click on the Pull requests to view the closed and open pull requests. At this time there should not be
any open pull request.
45 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
13. Select the Closed tab and click the pull request as though you were visiting it fresh.
14. You can see the options to Revert or Restore branch to restore the deleted branch. We will not be
reverting the PR or restoring the deleted branch.
46 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
Module 3 (Alternative): Git with GitHub, Lab 1: Getting Started with Git, Exercise 5: Managing
Repositories
In this exercise you will learn to create and manage repositories in GitHub.
Prerequisites
Complete Exercise 1.
Tasks
47 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
Module 3 (Alternative): Git with GitHub, Lab 1: Getting Started with Git, Exercise 5: Managing
Repositories
3. Enter the new repository name as NewRepo. We will leave the repository type as Public. Click Create
repository.
48 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
49 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
Module 3 (Alternative): Git with GitHub, Lab 1: Getting Started with Git, Exercise 5: Managing
Repositories
1. Sometimes you’ll have a need to rename or delete a repo, which is just as easy. Click on Settings tab
and one of the first settings you will notice is to rename the repository. Change the name to
NewRepo1 and click on Rename.
2. That's it. You have successfully renamed the repository. Switch back to the Settings for the NewRepo1
repository.
3. Scroll down the Options section and select Delete this repository from the Danger Zone area.
4. Read the warning and enter the name of the repository as [username]/NewRepo1 and click I
understand the consequences, delete this repository. Enter the password.
50 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
51 / 52
WorkshopPLUS - Essentials on Azure DevOps Services and GitHub_M3_GitHub_Git.md 4/15/2023
Module 3 (Alternative): Git with GitHub, Lab 1: Getting Started with Git, Exercise 5: Managing
Repositories
2. Click on Settings. While you can configure a lot of settings here including Dependency graph,
Dependabot alerts, etc. in Security & analysis section, we are interested in the settings for the branches.
Click on Branches.
3. As you will notice here, to set the branch protection rules, you have to upgrade to GitHub Pro or above.
Once you upgrade, you will be able to enforce restrictions on code merging, requiring reviews, etc. We
will leave this exercise here.
52 / 52