Skip to content

Commit eb794ad

Browse files
authored
Create codespace.md (#1)
* Create codespace.md * Update codespace.md
1 parent fbc7cf5 commit eb794ad

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

codespace.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Using GitHub Codespaces
2+
3+
## What is GitHub Codespaces?
4+
5+
GitHub Codespaces is a cloud-based development environment that allows you to run your code directly from within GitHub. It provides a fully-featured, configurable, and on-demand development environment that can be accessed from anywhere. With GitHub Codespaces, you can:
6+
7+
- Develop in a consistent environment across different machines.
8+
- Quickly start coding without setting up your local environment.
9+
- Use powerful cloud-based resources for development.
10+
11+
## How to Spin Up a Codespace Instance
12+
13+
Follow these steps to spin up a Codespace instance using the `devcontainer` file:
14+
15+
### Step 1: Navigate to Your Repository
16+
17+
1. Go to your repository on GitHub. In this case, navigate to [qldgov-sandbox/copilot-node-calculator](https://github.com/qldgov-sandbox/copilot-node-calculator).
18+
19+
### Step 2: Open Codespaces
20+
21+
2. Click on the `Code` button on the repository page.
22+
23+
![image](https://github.com/user-attachments/assets/5ecb1522-6106-4d8c-b2a3-28b969833c37)
24+
25+
3. Select the `Codespaces` tab.
26+
27+
![image](https://github.com/user-attachments/assets/078529d9-3f8c-4b53-b458-8f73ca36074c)
28+
29+
4. Click on `New codespace` to create a new Codespace.
30+
31+
![image](https://github.com/user-attachments/assets/cf2d0ec0-6183-4389-8158-2487055371fa)
32+
33+
### Step 3: Configure Your Codespace
34+
35+
5. GitHub Codespaces will automatically detect the `devcontainer.json` file in your repository and use it to set up your development environment.
36+
37+
6. Wait for the Codespace to start. This might take a few minutes as it sets up the environment according to the configurations specified in the `devcontainer.json` file.
38+
39+
### Step 4: Start Coding
40+
41+
7. Once the Codespace is ready, you will be taken to a VS Code-like interface in your browser. You can now start coding in the environment that has been set up according to your `devcontainer.json` file.
42+
43+
![image](https://github.com/user-attachments/assets/e450ae7d-cfc3-4272-a498-22999b36d264)
44+
45+
### Step 5: Accessing Terminal and Other Features
46+
47+
8. You can access the terminal by clicking on the menu and selecting `View > Terminal`.
48+
49+
![image](https://github.com/user-attachments/assets/4e8eabc2-e9ae-48a0-8c21-a1fb60ebbcb2)
50+
51+
9. Use the terminal to run commands, install dependencies, and test your code.
52+
53+
### Additional Tips
54+
55+
- You can customize your development environment further by modifying the `devcontainer.json` file.
56+
- Codespaces supports extensions, themes, and other VS Code features, which you can install to enhance your development experience.
57+
58+
## Conclusion
59+
60+
GitHub Codespaces provides a powerful and flexible development environment that you can access from anywhere. By following the steps above, you can quickly spin up a Codespace instance and start coding using the `devcontainer.json` file you created.

0 commit comments

Comments
 (0)