Part 3 | Publishing — Out into the world
Chapter 6. GitHub — putting what you built in the cloud
Key points
- GitHub is a service for storing the code you wrote on the internet
- It plays three roles: backup, sharing, and the starting point for deployment
- Beginners should always choose "Private". Never upload secrets
Why GitHub, here
The profile page from Chapter 5 exists only on your computer. To publish it, the code first has to live somewhere on the internet. The standard place for that is GitHub.
In one line, GitHub is a service for storing the code you wrote on the internet. You back up phone photographs to iCloud or Google Drive rather than leaving them on the device; think of this as the version for programs.
📝 Underneath, GitHub runs a mechanism called Git, which records the history of changes. If you keep developing seriously, knowing Git pays off, but in this guide everything happens with a few clicks in the editor, so there is no need to learn Git deeply. Knowing "there is a mechanism holding this up behind the scenes" is enough.
GitHub's three roles
1. Backup. Your code is also stored in the cloud, so a broken or replaced computer is not a disaster. The record survives.
2. Sharing. Stored code can be shared with others by URL. You can show it as a portfolio: "here is something I built".
3. The starting point for deployment. This is the role that matters most here. You can arrange that pushing code to GitHub automatically publishes it as a website. Vercel, in the next chapter, works exactly from GitHub.
Public and Private — always start Private
When you put code on GitHub, you choose between two visibility settings.
- Public — anyone can see the code; it turns up in search
- Private — only you can see it
While you are learning, always choose Private. The reason is that accidentally uploading a file containing a password or personal information turns into an incident. Until you can judge what is safe to upload, choose safety.
The principle from the previous part — raw patient data never goes to the cloud — holds here too. Check that no patient information, personal information or password has crept into your code or configuration files before uploading. Make that a habit.
Putting it on GitHub
The actual steps are simple.
1. Create a GitHub account. If you do not have one, the app GitHub Desktop is the easiest for beginners. Install it and follow the on-screen guidance to register an email address, password and username.
⚠️ Always create the account and enter the password with your own hands. These are your credentials, and they matter.
2. Push from the editor. Open Source Control in the left menu of your editor (Antigravity or similar). There will be a button such as "Publish to GitHub" or "Publish Branch"; click it, enter a project name, choose Private, and the upload finishes in a few clicks.
Your page is now stored in the cloud and ready to publish.
Chapter 6 summary
- GitHub stores the code you wrote in the cloud
- Three roles: backup, sharing, and the starting point for deployment
- Beginners choose Private; check for secrets before uploading