diff --git a/github/authenticate-authorize-user-identities-github/7-summary.yml b/github/authenticate-authorize-user-identities-github/8-summary.yml similarity index 90% rename from github/authenticate-authorize-user-identities-github/7-summary.yml rename to github/authenticate-authorize-user-identities-github/8-summary.yml index 01b6aef1..4ed0322b 100644 --- a/github/authenticate-authorize-user-identities-github/7-summary.yml +++ b/github/authenticate-authorize-user-identities-github/8-summary.yml @@ -11,4 +11,4 @@ metadata: ms.prod: learning-azure durationInMinutes: 2 content: | - [!include[](includes/7-summary.md)] \ No newline at end of file + [!include[](includes/7-summary.md)] diff --git a/github/authenticate-authorize-user-identities-github/includes/4-authorization.md b/github/authenticate-authorize-user-identities-github/includes/5-authorization.md similarity index 100% rename from github/authenticate-authorize-user-identities-github/includes/4-authorization.md rename to github/authenticate-authorize-user-identities-github/includes/5-authorization.md diff --git a/github/authenticate-authorize-user-identities-github/includes/5-team-synchronization.md b/github/authenticate-authorize-user-identities-github/includes/7-team-synchronization.md similarity index 100% rename from github/authenticate-authorize-user-identities-github/includes/5-team-synchronization.md rename to github/authenticate-authorize-user-identities-github/includes/7-team-synchronization.md diff --git a/github/github-codespaces/1-introduction.yml b/github/github-codespaces/1-introduction.yml new file mode 100644 index 00000000..4ec8cdb5 --- /dev/null +++ b/github/github-codespaces/1-introduction.yml @@ -0,0 +1,25 @@ +### YamlMime:ModuleUnit +uid: learn.github-codespaces.introduction +title: Introduction +metadata: + title: introduction + description: "TODO this field is for search engine optimization and is not user-visible; use 2-3 complete, grammatically correct sentences to describe the unit; include relevant search keywords." + ms.date: 5/24/2023 + author: a-a-ron + ms.author: aastewar + ms.topic: interactive-tutorial +########################################################################### +### +### If your content is related to a product or service, apply one value from the either the ms.prod allowlist +### or the ms.service allowlist. You can’t use both ms.prod and ms.service. +### +### If your content isn't about a product or service, you can omit both ms.prod and ms.service. +### +### The list of approved ms.prod values is here: https://review.learn.microsoft.com/help/platform/metadata-taxonomies?branch=main#msprod +### The list of approved ms.service values is here: https://review.learn.microsoft.com/help/platform/metadata-taxonomies?branch=main#msservice +### If you need to request new values, follow the process here: https://review.learn.microsoft.com/en-us/help/platform/metadata-allowlist-requests?branch=main + ms.prod: TODO + ms.service: TODO +durationInMinutes: 1 +content: | + [!include[](includes/1-introduction.md)] \ No newline at end of file diff --git a/github/github-codespaces/2-codespace-lifecycle.yml b/github/github-codespaces/2-codespace-lifecycle.yml new file mode 100644 index 00000000..8db9ae49 --- /dev/null +++ b/github/github-codespaces/2-codespace-lifecycle.yml @@ -0,0 +1,25 @@ +### YamlMime:ModuleUnit +uid: learn.github-codespaces.learning-content +title: Enter learning content title +metadata: + title: learning-content + description: "TODO this field is for search engine optimization and is not user-visible; use 2-3 complete, grammatically correct sentences to describe the unit; include relevant search keywords." + ms.date: 5/24/2023 + author: a-a-ron + ms.author: aastewar + ms.topic: interactive-tutorial +########################################################################### +### +### If your content is related to a product or service, apply one value from the either the ms.prod allowlist +### or the ms.service allowlist. You can’t use both ms.prod and ms.service. +### +### If your content isn't about a product or service, you can omit both ms.prod and ms.service. +### +### The list of approved ms.prod values is here: https://review.learn.microsoft.com/help/platform/metadata-taxonomies?branch=main#msprod +### The list of approved ms.service values is here: https://review.learn.microsoft.com/help/platform/metadata-taxonomies?branch=main#msservice +### If you need to request new values, follow the process here: https://review.learn.microsoft.com/en-us/help/platform/metadata-allowlist-requests?branch=main + ms.prod: TODO + ms.service: TODO +durationInMinutes: 1 +content: | + [!include[](includes/2-learning-content.md)] diff --git a/github/github-codespaces/3-managing.codespace.yml b/github/github-codespaces/3-managing.codespace.yml new file mode 100644 index 00000000..423eaa21 --- /dev/null +++ b/github/github-codespaces/3-managing.codespace.yml @@ -0,0 +1,25 @@ +### YamlMime:ModuleUnit +uid: learn.github-codespaces.learning-content +title: Enter learning content title +metadata: + title: learning-content + description: "TODO this field is for search engine optimization and is not user-visible; use 2-3 complete, grammatically correct sentences to describe the unit; include relevant search keywords." + ms.date: 5/24/2023 + author: a-a-ron + ms.author: aastewar + ms.topic: interactive-tutorial +########################################################################### +### +### If your content is related to a product or service, apply one value from the either the ms.prod allowlist +### or the ms.service allowlist. You can’t use both ms.prod and ms.service. +### +### If your content isn't about a product or service, you can omit both ms.prod and ms.service. +### +### The list of approved ms.prod values is here: https://review.learn.microsoft.com/help/platform/metadata-taxonomies?branch=main#msprod +### The list of approved ms.service values is here: https://review.learn.microsoft.com/help/platform/metadata-taxonomies?branch=main#msservice +### If you need to request new values, follow the process here: https://review.learn.microsoft.com/en-us/help/platform/metadata-allowlist-requests?branch=main + ms.prod: TODO + ms.service: TODO +durationInMinutes: 5 +content: | + [!include[](includes/4-learning-content.md)] diff --git a/github/github-codespaces/4-githubdev-versus-GitHub-Codespaces.yml b/github/github-codespaces/4-githubdev-versus-GitHub-Codespaces.yml new file mode 100644 index 00000000..4c3f48c4 --- /dev/null +++ b/github/github-codespaces/4-githubdev-versus-GitHub-Codespaces.yml @@ -0,0 +1,25 @@ +### YamlMime:ModuleUnit +uid: learn.github-codespaces.learning-content +title: Github.dev versus GitHub Codespaces +metadata: + title: learning-content + description: "TODO this field is for search engine optimization and is not user-visible; use 2-3 complete, grammatically correct sentences to describe the unit; include relevant search keywords." + ms.date: 5/24/2023 + author: a-a-ron + ms.author: aastewar + ms.topic: interactive-tutorial +########################################################################### +### +### If your content is related to a product or service, apply one value from the either the ms.prod allowlist +### or the ms.service allowlist. You can’t use both ms.prod and ms.service. +### +### If your content isn't about a product or service, you can omit both ms.prod and ms.service. +### +### The list of approved ms.prod values is here: https://review.learn.microsoft.com/help/platform/metadata-taxonomies?branch=main#msprod +### The list of approved ms.service values is here: https://review.learn.microsoft.com/help/platform/metadata-taxonomies?branch=main#msservice +### If you need to request new values, follow the process here: https://review.learn.microsoft.com/en-us/help/platform/metadata-allowlist-requests?branch=main + ms.prod: TODO + ms.service: TODO +durationInMinutes: 5 +content: | + [!include[](includes/4-learning-content.md)] diff --git a/github/github-codespaces/5-exercise.yml b/github/github-codespaces/5-exercise.yml new file mode 100644 index 00000000..e4179c17 --- /dev/null +++ b/github/github-codespaces/5-exercise.yml @@ -0,0 +1,25 @@ +### YamlMime:ModuleUnit +uid: learn.github-codespaces.exercise +title: Enter exercise title +metadata: + title: exercise + description: "TODO this field is for search engine optimization and is not user-visible; use 2-3 complete, grammatically correct sentences to describe the unit; include relevant search keywords." + ms.date: 5/24/2023 + author: a-a-ron + ms.author: aastewar + ms.topic: interactive-tutorial +########################################################################### +### +### If your content is related to a product or service, apply one value from the either the ms.prod allowlist +### or the ms.service allowlist. You can’t use both ms.prod and ms.service. +### +### If your content isn't about a product or service, you can omit both ms.prod and ms.service. +### +### The list of approved ms.prod values is here: https://review.learn.microsoft.com/help/platform/metadata-taxonomies?branch=main#msprod +### The list of approved ms.service values is here: https://review.learn.microsoft.com/help/platform/metadata-taxonomies?branch=main#msservice +### If you need to request new values, follow the process here: https://review.learn.microsoft.com/en-us/help/platform/metadata-allowlist-requests?branch=main + ms.prod: TODO + ms.service: TODO +durationInMinutes: 1 +content: | + [!include[](includes/5-exercise.md)] diff --git a/github/github-codespaces/6-knowledge-check.yml b/github/github-codespaces/6-knowledge-check.yml new file mode 100644 index 00000000..fe18dbe0 --- /dev/null +++ b/github/github-codespaces/6-knowledge-check.yml @@ -0,0 +1,66 @@ +### YamlMime:ModuleUnit +uid: learn.github-codespaces.knowledge-check +title: Knowledge check +metadata: + title: Knowledge check + description: "TODO this field is for search engine optimization and is not user-visible; use 2-3 complete, grammatically correct sentences to describe the unit; include relevant search keywords." + ms.date: 5/24/2023 + author: a-a-ron + ms.author: aastewar + ms.topic: interactive-tutorial + ms.prod: TODO + ms.service: TODO +durationInMinutes: 4 +content: | +quiz: + questions: + - content: "After creating a Codespace in which directory is the clone placed?" + choices: + - content: "/workspaces directory" + isCorrect: true + explanation: "After creating a Codespace, the clone is placed into the /workspace directory." + - content: "/temp directory" + isCorrect: false + explanation: "/temp directory is not the location where cloned content is placed." + - content: "~/.bashrc directory" + isCorrect: false + explanation: "~/.bashrc directory is not the location where cloned content is placed." + - content: Linux directory + isCorrect: false + explanation: "Linux directory is not the location where cloned content is placed." + - content: "What is the maximum number of Codespaces that you can create per repository or branch?" + choices: + - content: "You can only create two Codespaces." + isCorrect: false + explanation: "Two is not the maximum number of Codespaces you can create. However, there are limits to the number of Codespaces you can create and run at the same time" + - content: "You can create a total of ten workspaces." + isCorrect: false + explanation: "Ten is not the maximum number of Codespaces you can create. However, there are limits to the number of Codespaces that you can create and run at the same time." + - content: "You can create a total of thirty workspaces." + isCorrect: false + explanation: "Thirty is not the maximum number of Codespaces you can create. However, there are limits to the number of Codespaces that you can create and run at the same time." + - content: "You can create an unlimited number of Codespaces per repository or branch, depending upon available space. When you reach an upper amount of resources, a message will display that an existing Codespace needs to removed/deleted before a new Codespace can be created." + isCorrect: true + explanation: "You can have an unlimited number of Codespaces per repository or even per branch. However, there are limits to the number of Codespaces that you can create and run at the same time." + - content: "What happens when Codespace loses internet connectivity" + choices: + - content: "If the connection to the internet is lost while working in a Codespace, you will not be able to access your Codespace." + isCorrect: true + explanation: "A Codespace requires an internet connection. If the connection to the internet is lost while working in a Codespace, you will not be able to access your Codespace." + - content: "Codespace does not require an internet connection. I can access my Codespace regardless if I lose connectivity." + isCorrect: false + explanation: "Incorrect, a Codespace requires an internet connection." + - content: "If you lose internet connection while working on your Codespace, no changes will be saved" + isCorrect: false + explanation: "Incorrect, any uncommitted changes will be saved. When reestablished, you can access Codespace in the same state as when the connection was lost. + - content: "What defines the beginning of a Codespace’s lifecycle?" + choices: + - content: "A Codespace’s lifecycle begins when you create a Codespace and ends when you delete it." + isCorrect: true + explanation: "A Codespace’s lifecycle begins when you create a Codespace and ends when you delete it." + - content: "A Codespace's lifecycle begins immediately when GitHub is opened and ends when the software is closed." + isCorrect: false + explanation: "A Codespace’s lifecycle begins when you create a Codespace and ends when you delete it." + - content: "A Codespace's lifecycle begins when repository is created and ends when it is deleted." + isCorrect: false + explanation: "A Codespace’s lifecycle begins when you create a Codespace and ends when you delete it." diff --git a/github/github-codespaces/7-summary.yml b/github/github-codespaces/7-summary.yml new file mode 100644 index 00000000..3b36389b --- /dev/null +++ b/github/github-codespaces/7-summary.yml @@ -0,0 +1,25 @@ +### YamlMime:ModuleUnit +uid: learn.github-codespaces.summary +title: Summary +metadata: + title: summary + description: "TODO this field is for search engine optimization and is not user-visible; use 2-3 complete, grammatically correct sentences to describe the unit; include relevant search keywords." + ms.date: 5/24/2023 + author: a-a-ron + ms.author: aastewar + ms.topic: interactive-tutorial +########################################################################### +### +### If your content is related to a product or service, apply one value from the either the ms.prod allowlist +### or the ms.service allowlist. You can’t use both ms.prod and ms.service. +### +### If your content isn't about a product or service, you can omit both ms.prod and ms.service. +### +### The list of approved ms.prod values is here: https://review.learn.microsoft.com/help/platform/metadata-taxonomies?branch=main#msprod +### The list of approved ms.service values is here: https://review.learn.microsoft.com/help/platform/metadata-taxonomies?branch=main#msservice +### If you need to request new values, follow the process here: https://review.learn.microsoft.com/en-us/help/platform/metadata-allowlist-requests?branch=main + ms.prod: TODO + ms.service: TODO +durationInMinutes: 1 +content: | + [!include[](includes/7-summary.md)] diff --git a/github/github-codespaces/includes/1-introduction.md b/github/github-codespaces/includes/1-introduction.md new file mode 100644 index 00000000..a2182b16 --- /dev/null +++ b/github/github-codespaces/includes/1-introduction.md @@ -0,0 +1,15 @@ +GitHub Codespaces is a fully configured development environment hosted in the cloud. + +By using GitHub Codespaces, your workspace, along with all of your configured development environments, is available from any computer with access to the internet. GitHub Codespaces contains common languages, tools, and utilities for software development. + +## Learning objectives + +In this module, you will learn how to: + +- Describe GitHub Codespaces +- Define the GitHub Codespace lifecycle and how to perform each step +- Understand the different customizations you can personalize with GitHub Codespaces +- Understand when to use gitHub.dev and GitHub Codespaces + +## Pre-requisites +- A GitHub Account diff --git a/github/github-codespaces/includes/2-codespace-lifecycle.md b/github/github-codespaces/includes/2-codespace-lifecycle.md new file mode 100644 index 00000000..47061c8a --- /dev/null +++ b/github/github-codespaces/includes/2-codespace-lifecycle.md @@ -0,0 +1,85 @@ +GitHub Codespaces is an instant, cloud-based development environment that uses a container to provide you with common languages, tools, and utilities for development. GitHub Codespaces is a configurable, allowing you to create a customized development environment for your project. By configuring a custom development environment for your project, you can have a repeatable codespace configuration for all users of your project. + +A Codespace’s lifecycle begins when you create a Codespace and ends when you delete it. You can disconnect and reconnect to an active Codespace without affecting its running processes. You can stop and restart a Codespace without losing the changes that you have made to your project. + +:::image type="content" source="../media/codespaces-lifecycle.png" alt-text="Image of a circular lifecyle of a codespace that starts with creating and ends with deleting."::: + +## Creating a Codespace + +You can create a Codespace on GitHub.com, in Visual Studio Code, or by GitHub CLI. There are four ways to create a Codespace: + +- From a GitHub template or any template repository on GitHub.com to start a new project +- From a branch in your repository for new feature work +- From an open pull request to explore work-in-progress +- From a commit in a repository's history to investigate a bug at a specific point in time + +Codespaces can be temporary in order to test code or you can return to the same Codespace to work on long-running feature work. + +**NOTE: You can create more than one Codespace per repository or even per branch. However, there are limits to the number of Codespaces you can create and run at the same time. If you reach the maximum number of Codespaces and try to create another, a message displays that an existing Codespace needs to be removed/deleted before a new Codespace can be created.** + +You can create a new Codespace each time you develop in GitHub Codespaces or keep a long-running Codespace for a feature. If starting a new project, create a Codespace from a template and publish it to a repository on GitHub later. + +When creating a new Codespace each time you work on a project, you should regularly push your changes to ensure that any new commits are on GitHub. When using a long-running Codespace for a new project, pull from the repository's default branch each time you start working in Codespace, This will enable the environment to have the latest commits. The workflow is very similar to working with a project on a local machine. + +Repository administrators can enable GitHub Codespaces prebuilds for a repository to speed up Codespace creation. + +For an indepth walkthrough and step by step guidance see the two resources titled **A beginner’s guide to learning to code with GitHub Codespaces** and **Developing in codespace** in the resources section of the summary unit at the end of this module + +### Codespace creation process + +:::image type="content" source="../media/codespaces-diagram.png" alt-text="Diagram of a github codespace and how it connects from your code editor and into a docker container."::: + +When creating a GitHub Codespace, four processes must occur: + +1. VM and storage are assigned to your Codespace +2. A container is created +3. Connecting to the Codespace +4. Post-creation setup + +### Saving changes in a Codespace + +When you connect to a Codespace through the web, auto-save is automatically enabled to save changes after a specific amount of time has passed. When you connect to a Codespace through Visual Studio Code running on your desktop, you must enable auto-save. + +Your work will save to a virtual machine in the cloud. You can close and stop a Codespace and return to the saved work at a later time. If you have unsaved changes, you’ll receive a prompt to save them before exiting. However, if your Codespace is deleted, then your work will be lost. To save your work, you must commit your changes and push them to your remote repository or publish your work to a new one if you created your Codespace from a template. + +### Opening an existing Codespace + +You can reopen any of your active or stopped codespaces on GitHub.com, in a JetBrains IDE, in Visual Studio Code, or by using GitHub CLI. + +To resume an existing Codespace you can either go to the respository where the Codespace exists and press "," key on your keyboard and **select Resume this codespace** or open https://github.com/codespaces in the browser, select the repository, and then select the existing Codespace. + +### Timeouts for a Codespace + +If Codespace is inactive, or if you exit your Codespace without explicitly stopping, the application times out after a period of inactivity and stops running. The default timeout is after 30 minutes of inactivity. You cannot customize the duration of the timeout period for new Codespaces. + +When a Codespace times out, your data is kept from the last time your changes were saved. + +### Losing internet connection while using GitHub Codespaces + +A Codespace requires an internet connection. If the connection to the internet is lost while working in a Codespace, you will not be able to access your Codespace. However, any uncommitted changes will be saved. When you reestablish the internet connection, you can access the Codespace in the same state that it was left in when the connection was lost. + +**NOTE: If you have an unstable internet connection, you should frequently commit and push your changes.** + +## Closing or stopping a Codespace + +If you exit the Codespace without running the stop command (for example, by closing the browser tab) or leave the Codespace running without interaction, the Codespace and its running processes continue for the duration of the inactivity timeout period. The default inactivity timeout period is 30 minutes. You can define your personal timeout setting for Codespaces you create, but this may be overruled by an organization timeout policy. + +Only running Codespaces incur CPU charges. A stopped Codespace incurs only storage costs. + +You can stop and restart a Codespace to apply changes. For example, if you change the machine type used for your Codespace, you will need to stop and restart it for the change to take effect. When you close or stop your Codespace, all uncommitted changes are preserved until you connect to the Codespace again. + +**NOTE: You can also stop Codespace and choose to restart or delete it if you encounter an error or something unexpected.** + +## Rebuilding a Codespace + +You can rebuild your Codespace to implement changes to your dev container configuration. For most uses, you can create a new Codespace as an alternative to rebuilding a Codespace. When you rebuild your Codespace, images from the cache speed up the rebuild process. You could also perform a full rebuild to clear the cache and rebuilds the container with fresh images. + +**NOTE: When you rebuild the container in a Codespace, changes you made outside the /workspaces directory are cleared. Changes you made inside the /workspaces directory, including the clone of the repository or template you created the Codespace from, are preserved over a rebuild.** + +## Deleting a Codespace + +You can create a Codespace for a particular task. After you push your changes to a remote branch, then you can safely delete that Codespace. + +If you try to delete a Codespace with unpushed git commits, the editor will notify you that you have changes that have not been pushed to a remote branch. You can push any desired changes and then delete your Codespace. You can also continue to delete your Codespace and any uncommitted changes or export the code to a new branch without creating a new Codespace. + +Stopped Codespaces that remain inactive for a specified amount of time will be deleted automatically. Inactive Codespaces delete after 30 days, but you can customize your Codespace retention intervals. diff --git a/github/github-codespaces/includes/3-personalizing-your-codespace.md b/github/github-codespaces/includes/3-personalizing-your-codespace.md new file mode 100644 index 00000000..e886757a --- /dev/null +++ b/github/github-codespaces/includes/3-personalizing-your-codespace.md @@ -0,0 +1,35 @@ +GitHub Codespaces is a dedicated environment for you. You can configure your repositories with a dev container to define their default GitHub Codespaces environment, and personalize your development experience across all of your codespaces with dotfiles and Settings Sync. + +## What you can customize + +There are a multitude of ways for you to customize your Codespace. Let's review each one. + +- **Settings Sync:** You can synchronize your Visual Studio Code settings between the desktop application and the VS Code web client. +- **Dotfiles:** You can use a dotfiles repository to specify scripts, shell preferences, and other configurations. +- **Rename a codespace:** When you create a codespace it's assigned an auto-generated display name. If you have multiple codespaces, the display name helps you to differentiate between codespaces.You can change the display name for your codespace. +- **Change your shell:** You can change your shell in a codespace to keep the setup you're used to. When you're working in a codespace, you can open a new terminal window with a shell of your choice, change your default shell for new terminal windows, or install a new shell. You can also use dotfiles to configure your shell. +- **Change the machine type:** You can change the type of machine that's running your codespace, so that you're using resources appropriate for the work you're doing. +- **Set the default editor:** You can set your default editor for Codespaces in your personal settings page. On the settings page, you can set your editor preference so that when you create a codespace, or open an existing codespace, it is opened in your choice of: + - Visual Studio Code (desktop application) + - Visual Studio Code (web client application) + - JetBrains Gateway - for opening codespaces in a JetBrains IDE + - JupyterLab - the web interface for Project Jupyter +- **Set the default region:** You can set your default region in the GitHub Codespaces profile settings page to personalize where your data is held. +- **Set the timeout:** A codespace will stop running after a period of inactivity. By default this period is 30 minutes, but you can specify a longer or shorter default timeout period in your personal settings on GitHub. The updated setting will apply to any new codespaces you create, or to existing codespaces the next time you start them. +- **Configuring automatic deletion:** Inactive codespaces are automatically deleted. You can choose how long your stopped codespaces are retained, up to a maximum of 30 days. + +For more on how on customization and step by step instructions on how to do everything we reviewed above, check out article titled, "Personalize your codespace" in the Resources section at the end of this module. + +## Add to your Codespace with extensions or plugins + +You can add plugins and extensions within a Codespace to personalize your experience in JetBrains and VS Code. + +### VS Code extensions + +If you work on your Codespaces in the VS Code desktop application or the web client, you can add any extensions you need from the Visual Studio Code Marketplace. For information on how extensions run in GitHub Codespaces, see Supporting Remote Development and GitHub Codespaces in the VS Code documentation. + +If you already use VS Code, you can use Settings Sync to automatically sync extensions, settings, themes, and keyboard shortcuts between your local instance and any Codespaces you create. + +### JetBrains plugins + +If you work on your codespaces in a JetBrains IDE, you can add plugins from the JetBrains Marketplace. diff --git a/github/github-codespaces/includes/4-githubdev-versus-GitHub-Codespaces.md b/github/github-codespaces/includes/4-githubdev-versus-GitHub-Codespaces.md new file mode 100644 index 00000000..4298ac50 --- /dev/null +++ b/github/github-codespaces/includes/4-githubdev-versus-GitHub-Codespaces.md @@ -0,0 +1,24 @@ +You're probably asking yourself, when should I use GitHub Codespaces and when should I use github.dev? + +You can use github.dev to simply navigate files and sources code repositories from GitHub, and make and commit code changes. You can open any repository, fork, or pull request in github.dev editor. + +If you're wanting to do more heavy lifting like testing your code, you want to use GitHub Codespaces for that since github.dev has no compute associated with it. Because of this you won't be able to build and run your code or have terminal access. Meanwhile GitHub Codespaces you get the power of a personal Virtual Machine (VM) with terminal access, the same way you could use your local enviornment, just in the cloud. + +Let's review the differences between Codespaces and github.dev with the table below. + +### Codespace vs. github.dev + +| | github.dev | GitHub Codespace | +|--------|--------|--------| +| Cost | Free | Free monthly quota of usage for personal accounts | +| Availability | Available to everyone on GitHub.com | Available to everyone on GitHub.com | +| Startup | Github.dev opens instantly with a key-press and you can start using it right away without having to wait for additional configuration or installation | When you create or resume a codespace, the codespace is assigned a VM and the container is configured based on the contents of a devcontainer.json file. This setup may take a few minutes to create the development environment. | +| Compute | There is no associated compute, so you won’t be able to build and run your code or use the integrated terminal. | With GitHub Codespaces, you get the power of a dedicated VM on which you can run and debug your application.| +| Terminal access | None | GitHub Codespaces provides a common set of tools by default, meaning that you can use the Terminal exactly as you would in your local environment.| +| Extensions | Only a subset of extensions that can run on the web will appear in the Extensions View and can be installed | With GitHub Codespaces, you can use most extensions from the Visual Studio Code Marketplace.| + +### Continue working on Codespaces + +You can start your workflow in github.dev and continue working on a codespace. If you try to access the Run and Debug View or the Terminal, you'll be notified that they are not available in github.dev. + +To continue your work in a codespace, click Continue Working on… and select Create New Codespace to create a codespace on your current branch. Before you choose this option, you must commit any changes. diff --git a/github/github-codespaces/includes/6-exercise.md b/github/github-codespaces/includes/6-exercise.md new file mode 100644 index 00000000..e0f417e4 --- /dev/null +++ b/github/github-codespaces/includes/6-exercise.md @@ -0,0 +1,18 @@ +## How to start this exercise + +1. Right-click Start course hyperlink and open the link in a new tab. + - In the new tab, most of the prompts will automatically fill in for you. + - For owner, choose your personal account or an organization to host the repository. + - We recommend creating a public repository, as private repositories will use Actions minutes. +2. Scroll down and click the Create repository button at the bottom of the form. +3. After your new repository is created, wait about 20 seconds, then refresh the page. Follow the step-by-step instructions in the new repository's README. + +> [!div class="nextstepaction"] +> [Start the exercise on GitHub](https://github.com/skills/code-with-codespaces) + +When you've finished the exercise in GitHub, return here for: + +> [!div class="checklist"] +> * A quick knowledge check +> * A summary of what you've learned +> * To earn a badge for completing this module diff --git a/github/github-codespaces/includes/7-summary.md b/github/github-codespaces/includes/7-summary.md new file mode 100644 index 00000000..9680dda4 --- /dev/null +++ b/github/github-codespaces/includes/7-summary.md @@ -0,0 +1,18 @@ +In this module you learned about GitHub Codespaces, a fully configured development environment hosted in the cloud. + +You should now know how to: + +- Describe GitHub Codespaces +- Define the GitHub Codespace lifecycle and how to perform each step +- Understand the different customizations you can personalize with GitHub Codespaces +- Discern the differences between GitHub.dev and GitHub Codespaces + +## Resources +Here are some links to more information on the topics we discussed in this module: +- [A beginner’s guide to learning to code with GitHub Codespaces](https://github.blog/2023-02-22-a-beginners-guide-to-learning-to-code-with-github-codespaces/) +- [Developing in a codespace](https://docs.github.com/en/codespaces/developing-in-codespaces/developing-in-a-codespace) +- [Customizing your codespace](https://docs.github.com/en/codespaces/customizing-your-codespace) + +## How to provide feedback + +If you have content feedback or suggested changes for this Microsoft Learn module, use [this issue form](https://github.com/githubpartners/microsoft-learn/issues/new/choose) to provide that feedback. This content is maintained by GitHub and a team member will triage the request. Thank you for taking the time to improve our content! diff --git a/github/github-codespaces/index.yml b/github/github-codespaces/index.yml new file mode 100644 index 00000000..b85e333a --- /dev/null +++ b/github/github-codespaces/index.yml @@ -0,0 +1,51 @@ +### YamlMime:Module +uid: learn.github-codespaces +metadata: + title: github-codespaces + description: "TODO this field is for search engine optimization and is not user-visible; use 2-3 complete, grammatically correct sentences to describe the module; include relevant search keywords." + ms.date: 5/24/2023 + author: a-a-ron + ms.author: aastewar + ms.topic: module-standard-task-based # Please don't edit, used for our analytics +########################################################################### +### +### If your content is related to a product or service, apply one value from the either the ms.prod allowlist +### or the ms.service allowlist. You can’t use both ms.prod and ms.service. +### +### If your content isn't about a product or service, you can omit both ms.prod and ms.service. +### +### The list of approved ms.prod values is here: https://review.learn.microsoft.com/help/platform/metadata-taxonomies?branch=main#msprod +### The list of approved ms.service values is here: https://review.learn.microsoft.com/help/platform/metadata-taxonomies?branch=main#msservice +### If you need to request new values, follow the process here: https://review.learn.microsoft.com/en-us/help/platform/metadata-allowlist-requests?branch=main + ms.prod: TODO + ms.service: TODO +title: github-codespaces +summary: "TODO 2 sentences, 20-35 words, don't teach or motivate, avoid using 'learn', don't duplicate the title; see https://review.docs.microsoft.com/help/learn/id-guidance-introductory-summaries?branch=main" +abstract: | + By the end of this module, you'll be able to: + - "TODO learning objective 1" + - "TODO learning objective 2" + - "TODO learning objective 3 (if needed; see https://review.docs.microsoft.com/help/learn/id-guidance-learning-objectives?branch=main)" +prerequisites: | + - "TODO prerequisite 1" + - "TODO prerequisite 2" + - "TODO prerequisite 3 (if needed; see https://review.docs.microsoft.com/help/learn/id-guidance-prerequisites?branch=main" +iconUrl: /learn/achievements/generic-badge.svg +levels: # see level taxonomy https://review.docs.microsoft.com/help/contribute/metadata-taxonomies?branch=main#level + - TODO +roles: # see role taxonomy https://review.docs.microsoft.com/help/contribute/metadata-taxonomies?branch=main#role + - TODO +products: # see product taxonomy https://review.docs.microsoft.com/help/contribute/metadata-taxonomies?branch=main#product +- github +subjects: # see subject taxonomy https://review.docs.microsoft.com/help/contribute/metadata-taxonomies?branch=main#subject + - TODO +units: +- learn.github-codespaces.introduction +- learn.github-codespaces.learning-content +- learn.github-codespaces.exercise +- learn.github-codespaces.learning-content +- learn.github-codespaces.exercise +- learn.github-codespaces.knowledge-check +- learn.github-codespaces.summary +badge: + uid: learn.github-codespaces.badge \ No newline at end of file diff --git a/github/github-codespaces/media/2621760.png b/github/github-codespaces/media/2621760.png new file mode 100644 index 00000000..b21e0774 Binary files /dev/null and b/github/github-codespaces/media/2621760.png differ diff --git a/github/github-codespaces/media/codespaces-diagram.png b/github/github-codespaces/media/codespaces-diagram.png new file mode 100644 index 00000000..cdc5705c Binary files /dev/null and b/github/github-codespaces/media/codespaces-diagram.png differ diff --git a/github/github-codespaces/media/codespaces-lifecycle.png b/github/github-codespaces/media/codespaces-lifecycle.png new file mode 100644 index 00000000..dcfe2710 Binary files /dev/null and b/github/github-codespaces/media/codespaces-lifecycle.png differ diff --git a/github/github-codespaces/media/port-forwarding.png b/github/github-codespaces/media/port-forwarding.png new file mode 100644 index 00000000..f543d316 Binary files /dev/null and b/github/github-codespaces/media/port-forwarding.png differ