🎯 Learning Outcomes
- Section 1: Access and launch a GitHub Codespace.
- Section 2: Create a new file and add content in the cloud IDE.
- Section 3: Commit and push your first file to your GitHub repository.
Section 1: Accessing GitHub Codespaces
- First, follow the guide to Accessing GitHub Codespaces.
- Wait for the environment to load. You will be in a cloud-based version of VS Code, complete with a file explorer and terminal.
Important Note on Billing
To save money on billing for GitHub Codespaces, please visit the billing information.
“…The Free and Pro plans for personal accounts include free use of GitHub Codespaces up to a fixed monthly usage…”
Section 2: Your First Task — Create a New File
Once your Codespace is loaded, your first task is to create a new file about your hobbies.
- In the File Explorer on the left-hand sidebar, right-click in the empty space and select “New File”.
- Name the new file
hobbies.md. - In the editor, write a few sentences about your hobbies or a creative project you’re passionate about. You can use Markdown to format your text.
Example hobbies.md content:
# My Hobbies
* Playing the guitar
* Hiking in the mountains
* Learning to code in Python
## Creative Project: Building a Chess AI
I'm currently working on a small project to build a chess-playing AI.
I'm using Python and the `python-chess` library. It's a great way to learn more about algorithms and data structures.
Section 3: Submitting Your Assignment
Now, you will save your new file to your GitHub repository using Git.
- Click on the “Source Control” icon in the left-hand sidebar (it looks like a branching fork).
- You should see your new file,
hobbies.md, listed under “Changes”. - In the “Message” box at the top, type a short commit message that describes your changes.
Example: “Add my hobbies and projects”
- Click the checkmark icon to “Commit”. If it’s a dropdown, select “Commit & Push”.
- If prompted, select “Yes” to stage your changes and commit them. This will save your new file to your repository on GitHub.