03. Connecting a GitHub Repository
1. Register the local folder as a Git repository
Done in GitHub Desktop:
- File → Add local repository
- Choose... → select
C:\dev\SecureNomad - When "This directory does not appear to be a Git repository" appears, click create a repository
:::warning An extra nested folder gets created
The create a repository dialog creates a new folder named [Name] inside [Local path].
As a result, a nested folder such as C:\dev\SecureNomad\SecureNomad was created.
→ Troubleshooting: Nested repository folder
:::
The reliable way: git init in the terminal
If Git for Windows is installed, creating the repository from the terminal is the most reliable approach:
cd /d C:\dev\SecureNomad
git init -b main
Then in GitHub Desktop: File → Add local repository → C:\dev\SecureNomad → Add repository.
2. First commit
- The Changes tab lists the Docusaurus files.
- Make sure
node_modulesis not in the list. (.gitignoreexcludes it) - Summary:
Create Docusaurus project→ Commit to main
3. Publish to GitHub
- Click Publish repository at the top
- Settings
| Item | Value | Reason |
|---|---|---|
| Name | SecureNomad | Becomes part of the site URL path |
| Keep this code private | Unchecked | GitHub Pages on a free account supports public repositories only |
- Click Publish repository
Result: https://github.com/InseokJeon-Sec/SecureNomad
:::caution Public repositories Anyone can see every file and the full commit history of a public repository. Review the Changes list before committing so that IPs, accounts, API keys, or internal screenshots from labs do not slip into Markdown or images. Once pushed, content remains in the history even after the file is deleted. :::
Repository name and site URL
| Repository name | Site URL | baseUrl |
|---|---|---|
<username>.github.io | https://<username>.github.io/ | / |
SecureNomad (chosen) | https://inseokjeon-sec.github.io/SecureNomad/ | /SecureNomad/ |
Once a custom domain is connected, baseUrl becomes / either way.