| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
Nicely done customizing your codespace! 🥳
When using any development environment, customizing the settings and tools to your preferences and workflows is an important step. GitHub Codespaces offers two main ways of personalizing your codespace: Settings Sync with VS Code and dotfiles.
Dotfiles will be the focus of this activity.
What are dotfiles? Dotfiles are files and folders on Unix-like systems starting with . that control the configuration of applications and shells on your system. You can store and manage your dotfiles in a repository on GitHub.
Let's see how this works!
Start from the landing page of your repository.
Click the Code button located in the middle of the page.
Click the Codespaces tab on the box that pops up.
Click the Create codespace on main button.
Wait about 2 minutes for the codespace to spin itself up.
Verify your codespace is running. The browser should contain a VS Code web-based editor and a terminal should be present such as the below:
From inside the codespace in the VS Code explorer window, create a new file setup.sh.
Enter the following code into the file:
#!/bin/bash
sudo apt-get update
sudo apt-get install sl
echo "export PATH=\$PATH:/usr/games" >> ~/.bashrcSave the file.
Note: The file should autosave.
Commit the file changes. From the VS Code terminal enter:
git add setup.sh --chmod=+x
git commit -m "Adding setup.sh from the codespace!"Push the changes back to your repository. From the VS Code terminal, enter:
git pushSwitch back to the homepage of your repository and view the setup.sh to verify the new code was pushed to your repository.
Close the codespace web browser tab.
Click the Create codespace on main button.
Wait about 2 minutes for the codespace to spin itself up.
Verify your codespace is running, as you did previously.
Verify the setup.sh file is present in your VS Code editor.
From the VS Code terminal, type or paste:
slEnjoy the show!
Wait about 20 seconds then refresh this page (the one you're following instructions from). GitHub Actions will automatically update to the next step.
| Back | FazBrowse Home | New Git URL |