-
Notifications
You must be signed in to change notification settings - Fork 0
/
github-codespace.html
18 lines (17 loc) · 14.6 KB
/
github-codespace.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!DOCTYPE html><html lang="de-ch"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>GitHub Codespace - Finecloud</title><meta name="description" content="What is a Codespace? A codespace is a development environment that's hosted in the cloud. You can customize your project for GitHub Codespaces by committing configuration files to your repository (also known as configuration-as-code), which creates a repeatable codespace configuration for all users of your…"><meta name="generator" content="Publii Open-Source CMS for Static Site"><link rel="stylesheet" href="https://www.finecloud.ch/media/plugins/syntaxHighlighter/prism-black.css"><link rel="canonical" href="https://www.finecloud.ch/github-codespace.html"><link rel="alternate" type="application/atom+xml" href="https://www.finecloud.ch/feed.xml"><link rel="alternate" type="application/json" href="https://www.finecloud.ch/feed.json"><meta property="og:title" content="GitHub Codespace"><meta property="og:site_name" content="Finecloud"><meta property="og:description" content="What is a Codespace? A codespace is a development environment that's hosted in the cloud. You can customize your project for GitHub Codespaces by committing configuration files to your repository (also known as configuration-as-code), which creates a repeatable codespace configuration for all users of your…"><meta property="og:url" content="https://www.finecloud.ch/github-codespace.html"><meta property="og:type" content="article"><link rel="shortcut icon" href="https://www.finecloud.ch/media/website/finecloud.png" type="image/png"><link rel="stylesheet" href="https://www.finecloud.ch/assets/css/style.css?v=39da73365516a098a9b73b721fc970e2"><script type="application/ld+json">{"@context":"http://schema.org","@type":"Article","mainEntityOfPage":{"@type":"WebPage","@id":"https://www.finecloud.ch/github-codespace.html"},"headline":"GitHub Codespace","datePublished":"2024-04-05T21:02","dateModified":"2024-04-06T14:23","description":"What is a Codespace? A codespace is a development environment that's hosted in the cloud. You can customize your project for GitHub Codespaces by committing configuration files to your repository (also known as configuration-as-code), which creates a repeatable codespace configuration for all users of your…","author":{"@type":"Person","name":"Finecloud","url":"https://www.finecloud.ch/authors/finecloud/"},"publisher":{"@type":"Organization","name":"Finecloud"}}</script><meta name="google-site-verification" content="seFY9U12uiEq5U3_MyZiX6XWzk0AVFl9zITr2ZKsytY"></head><body><div class="site-container"><header class="top" id="js-header"><a class="logo" href="https://www.finecloud.ch/">Finecloud</a><nav class="navbar js-navbar"><button class="navbar__toggle js-toggle" aria-label="Menu" aria-haspopup="true" aria-expanded="false"><span class="navbar__toggle-box"><span class="navbar__toggle-inner">Menu</span></span></button><ul class="navbar__menu"><li><a href="https://www.finecloud.ch/" target="_self">Blog</a></li><li><a href="https://www.finecloud.ch/tags/" target="_self">Tags</a></li></ul></nav><div class="search"><div class="search__overlay js-search-overlay"><div class="search__overlay-inner"><form action="https://www.finecloud.ch/search.html" class="search__form"><input class="search__input js-search-input" type="search" name="q" placeholder="search..." aria-label="search..." autofocus="autofocus"></form><button class="search__close js-search-close" aria-label="Close">Close</button></div></div><button class="search__btn js-search-btn" aria-label="Search"><svg role="presentation" focusable="false"><use xlink:href="https://www.finecloud.ch/assets/svg/svg-map.svg#search"/></svg></button></div></header><main><article class="post"><div class="hero"><figure class="hero__image hero__image--overlay"><img src="https://www.finecloud.ch/media/website/download.jpg" srcset="https://www.finecloud.ch/media/website/responsive/download-xs.jpg 300w, https://www.finecloud.ch/media/website/responsive/download-sm.jpg 480w, https://www.finecloud.ch/media/website/responsive/download-md.jpg 768w, https://www.finecloud.ch/media/website/responsive/download-lg.jpg 1024w, https://www.finecloud.ch/media/website/responsive/download-xl.jpg 1360w, https://www.finecloud.ch/media/website/responsive/download-2xl.jpg 1600w" sizes="100vw" loading="eager" alt=""></figure><header class="hero__content"><div class="wrapper"><div class="post__meta"><time datetime="2024-04-05T21:02">April 5, 2024</time></div><h1>GitHub Codespace</h1></div></header></div><div class="wrapper post__entry"><h2 id="what-is-a-codespace">What is a Codespace?</h2><p>A codespace is a development environment that's hosted in the cloud. You can customize your project for GitHub Codespaces by committing configuration files to your repository (also known as configuration-as-code), which creates a repeatable codespace configuration for all users of your project. Each codespace you create is hosted by GitHub in a Docker container that runs on a virtual machine. You can choose the type of machine you want to use depending on the resources you need.</p><h2 id="how-can-i-create-a-codespace">How can I create a Codespace?</h2><p>There are four ways to create a Codespace: </p><ul><li>From a GitHub template or any template repository on GitHub.com to start a new project.</li><li>From a branch in your repository for new feature work.</li><li>From an open pull request to explore work-in-progress.</li><li>From a commit in a repository's history to investigate a bug at a specific point in time.</li></ul><p>The easiest way to start a Codespace is by clicking the green Code button and then choosing open in a Codespace:</p><figure class="post__image post__image--center"><img loading="lazy" src="https://www.finecloud.ch/media/posts/102/SCR-20240405-stqz.png" height="892" width="942" alt="" sizes="100vw" srcset="https://www.finecloud.ch/media/posts/102/responsive/SCR-20240405-stqz-xs.png 300w, https://www.finecloud.ch/media/posts/102/responsive/SCR-20240405-stqz-sm.png 480w, https://www.finecloud.ch/media/posts/102/responsive/SCR-20240405-stqz-md.png 768w, https://www.finecloud.ch/media/posts/102/responsive/SCR-20240405-stqz-lg.png 1024w, https://www.finecloud.ch/media/posts/102/responsive/SCR-20240405-stqz-xl.png 1360w, https://www.finecloud.ch/media/posts/102/responsive/SCR-20240405-stqz-2xl.png 1600w"></figure><h4 id="what-happens-when-i-create-a-codespace">What happens when I create a Codespace?</h4><p>When you create a GitHub Codespace, four processes occur:</p><ol><li>VM and storage are assigned to your Codespace.</li><li>A container is created.</li><li>A connection to the Codespace is made.</li><li>A post-creation setup is made.</li></ol><h2 id="what-you-can-customize">What you can customize</h2><p>There are many ways you can customize your Codespace. Let's review each one.</p><ul><li>Settings Sync: You can synchronize your Visual Studio Code (VS Code) settings between the desktop application and the VS Code web client.</li><li>Dotfiles: You can use a dotfiles repository to specify scripts, shell preferences, and other configurations.<br></li><li>Rename a Codespace: When you create a Codespace, it's assigned an autogenerated 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.<br></li><li>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.<br></li><li>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.<br></li><li>Set the default editor: You can set your default editor for Codespaces in your personal settings page. Set your editor preference so that when you create a Codespace or open an existing Codespace, it opens to your default editor.<br>- Visual Studio Code (desktop application)<br>- Visual Studio Code (web client application)<br>- JetBrains Gateway - for opening Codespaces in a JetBrains IDE<br>- JupyterLab - the web interface for Project Jupyter<br></li><li>Set the default region: You can set your default region in the GitHub Codespaces profile settings page to personalize where your data is held.<br></li><li>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 applies to any new Codespaces you create, or to existing Codespaces the next time you start them.</li><li>Configure automatic deletion: Inactive Codespaces are automatically deleted. You can choose how long your stopped Codespaces are retained, up to a maximum of 30 days.<br></li></ul><h2 id="difference-betweenandnbspcodespaces-and-githubdev-editor">Difference between Codespaces and GitHub.dev editor</h2><h4 id="when-should-i-use-github-codespaces-and-when-should-i-use-githubdev">when should I use GitHub Codespaces and when should I use GitHub.dev?</h4><p>GitHub.dev is a good fit if you only want to navigate some files and sources code repositories from GitHub, and maybe make and commit small code changes.</p><p>On the other hand, if you want to run a bunch of tests with your code, or build a heavy application you better use GitHub Codespaces. It has compute associated with it so you can build your code, run your code, and have terminal access. GitHub.dev doesn't have compute in it. With GitHub Codespaces, you get the power of a personal Virtual Machine (VM) with terminal access, the same way you could use your local environment, just in the cloud.</p><div><table><tr><th></th><th>GitHub.dev</th><th>GitHub Codespaces</th></tr><tr><td>Cost</td><td>Free</td><td>Free monthly quota of usage for personal accounts</td></tr><tr><td>Availability</td><td>Available to everyone on GitHub.com</td><td>Available to everyone on GitHub.com</td></tr><tr><td>Startup</td><td>GitHub.dev opens instantly with a key-press and you can start using it right away without having to wait for configuration or installation</td><td>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 takes a few minutes to create the development environment.</td></tr><tr><td>Compute</td><td>There's no associated compute, so you can't build and run your code or use the integrated terminal.</td><td>With GitHub Codespaces, you get the power of a dedicated VM to run and debug your application.</td></tr><tr><td>Terminal access</td><td>None</td><td>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.</td></tr><tr><td>Extensions</td><td>Only a subset of extensions that can run on the web appear in the extensions view and can be installed</td><td>With GitHub Codespaces, you can use most extensions from the Visual Studio Code Marketplace.</td></tr></table></div><h2 id="using-codespace-images">Using Codespace images</h2><p>One of the biggest benefits of codespaces is that Github ships images with the most recent and common tools you need to develop. Have a look at this Repository: <a href="https://github.com/devcontainers/images/tree/main/src/universal" target="_blank" rel="nofollow noopener">https://github.com/devcontainers/images/tree/main/src/universal</a></p></div><footer class="wrapper post__footer"><p class="post__last-updated">This article was updated on April 6, 2024</p><ul class="post__tag"><li><a href="https://www.finecloud.ch/tags/codespace/">codespace</a></li><li><a href="https://www.finecloud.ch/tags/git/">git</a></li><li><a href="https://www.finecloud.ch/tags/github/">github</a></li><li><a href="https://www.finecloud.ch/tags/softwareentwicklung/">software development</a></li></ul><div class="post__share"></div></footer></article><nav class="post__nav"><div class="post__nav-inner"><div class="post__nav-prev"><svg width="1.041em" height="0.416em" aria-hidden="true"><use xlink:href="https://www.finecloud.ch/assets/svg/svg-map.svg#arrow-prev"/></svg> <a href="https://www.finecloud.ch/awk-and-sed.html" class="post__nav-link" rel="prev"><span>Previous</span> Awk and Sed</a></div><div class="post__nav-next"><a href="https://www.finecloud.ch/third-party-github-actions.html" class="post__nav-link" rel="next"><span>Next</span> Third-party GitHub Actions </a><svg width="1.041em" height="0.416em" aria-hidden="true"><use xlink:href="https://www.finecloud.ch/assets/svg/svg-map.svg#arrow-next"/></svg></div></div></nav><div class="post__related related"><div class="wrapper"><h2 class="h5 related__title">You should also read:</h2><article class="related__item"><div class="feed__meta"><time datetime="2024-07-31T17:32" class="feed__date">Juli 31, 2024</time></div><h3 class="h1"><a href="https://www.finecloud.ch/github-classic-vs-fine-grained-personal-access-tokens.html">GitHub classic vs. fine-grained Personal Access Tokens</a></h3></article><article class="related__item"><div class="feed__meta"><time datetime="2024-04-08T20:50" class="feed__date">April 8, 2024</time></div><h3 class="h1"><a href="https://www.finecloud.ch/third-party-github-actions.html">Third-party GitHub Actions</a></h3></article></div></div></main><footer class="footer"><div class="footer__copyright"><p>Powered by Publii</p></div><button onclick="backToTopFunction()" id="backToTop" class="footer__bttop" aria-label="Back to top" title="Back to top"><svg><use xlink:href="https://www.finecloud.ch/assets/svg/svg-map.svg#toparrow"/></svg></button></footer></div><script>window.publiiThemeMenuConfig = {
mobileMenuMode: 'sidebar',
animationSpeed: 300,
submenuWidth: 'auto',
doubleClickTime: 500,
mobileMenuExpandableSubmenus: true,
relatedContainerForOverlayMenuSelector: '.top',
};</script><script defer="defer" src="https://www.finecloud.ch/assets/js/scripts.min.js?v=6ca8b60e6534a3888de1205e82df8528"></script><script>var images = document.querySelectorAll('img[loading]');
for (var i = 0; i < images.length; i++) {
if (images[i].complete) {
images[i].classList.add('is-loaded');
} else {
images[i].addEventListener('load', function () {
this.classList.add('is-loaded');
}, false);
}
}</script><script defer="defer" src="https://www.finecloud.ch/media/plugins/syntaxHighlighter/prism.js"></script></body></html>