General Introduction
GitHub Codespaces is an instant cloud-based development environment designed to provide developers with an anytime, anywhere programming experience. It uses container technology and supports a wide range of programming languages and tools, allowing users to access and edit code on any device through a browser or local editor.Codespaces provides a highly configurable development environment, ensuring that all members of a project can work in the same environment, resulting in more efficient development and collaboration.
The free configuration is 2C 8G RAM + 32G disk, which can be used for 60 hours per month. It's no different from using VS code locally, you can use it as you go, and the disk is permanent.
Function List
- Instant development environment: No local configuration required, start coding anywhere, anytime.
- Multi-language support: Supports multiple programming languages and tools to meet different development needs.
- Highly configurable: Customize the development environment through the configuration file to adapt to different project requirements.
- cross-device access: Flexibility and ease of accessing the code space through a browser or local editor.
- Collaborative development: Supports team collaboration by providing real-time sharing and collaborative editing capabilities.
- Resource management: Optimize resource usage by choosing different VM configurations based on project requirements.
- safety: Provide a secure development environment that protects code and data security.
Using Help
Creating a code space
- Navigating to the Template Repository: Access a repository of templates on GitHub, such as
github/haikus-for-codespaces
The - Creating a code space: Click on "Use this template" and then select "Open in codespace".
- Running the application: Once the code space is created, the template repository is automatically cloned into it. Open a terminal and type
npm run dev
command to start the application.
Editing and viewing changes
- Edit Code: Open File Explorer in the code space and select the file you want to edit to make changes.
- View Changes: Switch to the Applications tab in your browser and refresh the page to see the modified effect.
Submit and push changes
- temporary storage of changes: In the Source Code Management view, select the file to be staged.
- Submit changes: Enter the submission message and click the "Submit" button.
- Push to repository: Select Publish Branch, enter a repository name, and select Public or Private Repository.
Personalized Settings
- Installation of extensions: Select the Extensions icon in the Activity Bar to search for and install the required VS Code extensions.
- Synchronization Settings: Enable the settings synchronization feature to synchronize local settings to the code space.
Resource management
- Selecting a Virtual Machine Configuration: Choose from a variety of virtual machine types, ranging from 2 cores to 32 cores, depending on your project needs.
- Managing storage and computing resources: Set spending limits and optimize resource use to ensure efficient operation of the development environment.
safety
- Protecting code and data: Use the security features provided by GitHub to keep your code and data safe.
- access control: Set access rights to ensure that only authorized users can access the code space.