In this workshop, we will be using GitHub Codespaces.
What is GitHub Codespaces? It's a development environment that's hosted in the cloud. It allows you to develop entirely in the cloud, without needing to install anything on your local machine. It's like Visual Studio Code, but in the cloud.
With GitHub Codespaces, you can create a new development environment in seconds, and start coding right away. You can also share your development environment with others, and collaborate in real-time.
OK. Let's get started!
-
First, you need to fork this repository to your GitHub account. To do that, click the "Fork" button at the top-right corner of this page.
-
You will see the screen below. Select your GitHub account, and click the "Create fork" button.
-
After forking the repository, you will be redirected to your forked repository.
You have forked the repository to your GitHub account. Now, you can start coding in GitHub Codespaces.
-
To open the repository in GitHub Codespaces, click the "Code" button at the top-right corner of the repository, and click the "Create codespace on main" button.
-
Wait for a few minutes. GitHub initialises the new codespace instance for you. Depending on your network status, it might take 5-10 minutes.
-
Your codespace instance is ready when you see the screen below.
-
In the terminal, enter the following command to see whether your codespace has a proper repository setup.
git remote -v
You should see the output like below.
origin https://github.com/{{YOUR_GITHUB_ID}}/workshop-portfolio (fetch) origin https://github.com/{{YOUR_GITHUB_ID}}/workshop-portfolio (push) upstream https://github.com/dotnetgirls/workshop-portfolio (fetch) upstream https://github.com/dotnetgirls/workshop-portfolio (push)
-
In the terminal, enter the following commands to see whether your codespace is ready for app development.
dotnet --list-sdks
-
You should see the .NET SDK version
6.x
,7.x
and8.x
like below. The last 3 digit might be different from what you see, but the first digit should be6
,7
and8
.6.0.420 [/usr/share/dotnet/sdk] 7.0.407 [/usr/share/dotnet/sdk] 8.0.202 [/usr/share/dotnet/sdk]
-
Make sure you're in the repository root directory.
cd $CODESPACE_VSCODE_FOLDER echo $CODESPACE_VSCODE_FOLDER
Congratulations! You have created a new codespace instance. Now, you can start coding in the cloud.