From the course: SQL for Data Analysis

Setting up Codespaces - SQL Tutorial

From the course: SQL for Data Analysis

Setting up Codespaces

- [Ravi] This is Ravi De Lobos, senior staff instructor at LinkedIn Learning, and I'm going to show you how to work with LinkedIn Learning courses using GitHub Codespaces. Codespaces is a code editor in the cloud with the full power of Visual Studio Code. It allows for real-world hands-on practice that mirrors software development in the workplace. This course was created using GitHub Codespaces. Using Codespaces, you have everything you need to get going without needing complex installations or build tools. One click and you're ready to go. First, make sure you've signed up for a free GitHub account and that you've logged in. You just see your profile icon right here. When you go to the repository for one of our courses, look for the Code button. Click on Create codespace. The first time you open up a codespace, it might take a few minutes to create the virtual machine. Once it's done, you'll enter the code editor environment. If you're familiar with Visual Studio Code, this is a special version of that editor running on GitHub's servers. The cloud editor's menu lives in a hamburger icon inside the activity bar. The menu will let you see the keyboard shortcuts for your operating system. Let's find the shortcut for the command palette. Look in the hamburger menu under View, and then look for the keyboard shortcut for your operating system. The activity bar has the most common tools you'll need to work with projects. You can, for example, show or hide the Explorer, do a search and replace for content, manage features of the repository, and much more. By the way, if for any reason, you lose the activity bar, you can get it back using the command palette. Your course can have one or more extensions pre-installed based on the course you're taking. Those can be found in the Extensions panel. Because this is a browser, it's easy to inadvertently close the browser window and lose the editor. If you do that, don't panic. Codespaces saves everything you're doing on a virtual machine. You can always get the codespace back for this repo by going to the Code menu and finding your codespace right here. Notice that it even remembered that I had opened the Extensions panel. The sample course I'm looking at is what is known as a flat branch repository. You can tell because there is a single branch when you click on the branch icon on the status bar. You can also tell because there are different folders for each of the videos in the course. Your instructor will let you know what the folder structure is for your course. Forking let's you create your own copy of the repository on your account so that you can keep any changes that you've made even if you've deleted the codespace. To create your own fork, you can click on the Fork button on the repository. I'm going to hit Create fork. Now, I have my own copy of this repository. And if I want to, I can start a new codespace on that fork. This fork version is almost exactly like the original repository, but it will let you push your own changes. Notice that the URL of the repository is slightly different. Let's go ahead and make a simple change to this file right here. I'm going to save it. You'll note that there is an M right here as well as an asterisk on this branch. In the Source Control panel, you can also see a 1 for the change that we just made. Let's go ahead and try to commit this change. I'm going to hit the Commit button and I'll ask it to go ahead and state the changes. And then I'm going to hit this button here to commit this onto my own version of the repo. I'll hit OK. You can also let it go ahead and run git fetch. That way, it'll automatically sync with your forked repo. Now, that change will be stored in your own version of this repository. Don't worry, if you forget to fork a repo and then try to push changes, Codespaces will also ask you if you want to create a fork automatically. Look for additional course specific tips from the instructor. Now, let's get back to the course.

Contents