Skip to main content

Cloud — GitHub Setup

Cloud deployment starts with GitHub.

GitHub stores your project online. When you push changes, Cloudflare Pages, Netlify, or Vercel automatically rebuild and deploy your site.

This guide walks you through creating a repo and pushing your Pycora Pro project.


Before You Begin​

Make sure:


Step 1 — Create a GitHub Repository​

  1. Open https://github.com/new
  2. Fill in:
FieldValue
Repository namepycora-pro (or any name you like)
DescriptionOptional
VisibilityPublic or Private (your choice)
Initialize with README❌ Do not check
Add .gitignore❌ Do not check
Choose a license❌ Do not check
  1. Click Create repository

GitHub shows you a page with setup commands. Keep this page open.


Step 2 — Initialize Git in Your Project​

Open a terminal inside the Pycora Pro folder.

How to Open a Terminal in the Project Folder​

Windows:

  1. Open the pycora-pro folder in File Explorer
  2. Click the address bar at the top
  3. Type cmd and press Enter

Mac:

  • Right-click the pycora-pro folder → New Terminal at Folder

Linux:

  • Open Terminal, then: cd ~/pycora-pro

Run These Commands​

git init
git add .
git commit -m "Initial commit"

This creates a local Git repository and commits all your files.


Step 3 — Add a .gitignore File​

Before pushing, create a .gitignore file in the project root to exclude files that should not go to GitHub.

Create .gitignore with this content:

# Python
__pycache__/
*.pyc
*.pyo

# Output (generated, no need to commit)
output/

# OS files
.DS_Store
Thumbs.db

# Editor
.vscode/
.idea/

# Node
node_modules/

Note: output/ is not committed — Cloudflare/Netlify/Vercel rebuild it from source on every deploy.


Step 4 — Connect to GitHub​

Back on the GitHub page you kept open, copy the two commands under "…or push an existing repository from the command line".

Run them in your terminal:

git remote add origin https://github.com/YOUR-USERNAME/pycora-pro.git
git branch -M main
git push -u origin main

Replace YOUR-USERNAME with your actual GitHub username.

First time? GitHub may ask for credentials. Use a personal access token — not your password. See GitHub's guide.


Step 5 — Verify the Push​

  1. Refresh the GitHub repo page
  2. You should see all your project files — content/, templates/, static/, _data/, ssg.py, dev.py, install.py
  3. output/ should not appear (it is ignored)

If everything looks right, your project is on GitHub.


Step 6 — (Optional) Keep Pushing as You Work​

Every time you change your content:

git add .
git commit -m "Update content"
git push

Cloudflare/Netlify/Vercel detects the push and rebuilds your site automatically.


What About Private Repos?​

GitHub supports private repositories on the free plan.

  • Public repo — anyone can see your code and content
  • Private repo — only you and invited collaborators can see it

For client work, use a private repo. Both work with Cloudflare Pages, Netlify, and Vercel.


Troubleshooting​

git: command not found​

Git is not installed. See Cloud Getting Started — Step 3.

fatal: remote origin already exists​

You already added a remote. Either remove it:

git remote remove origin

Then add the new one. Or update it:

git remote set-url origin https://github.com/YOUR-USERNAME/pycora-pro.git

Permission denied (publickey)​

You are using SSH but have no key set up. Either:

  • Switch to HTTPS: git remote set-url origin https://github.com/YOUR-USERNAME/pycora-pro.git
  • Or set up SSH keys: GitHub's guide

Authentication failed​

GitHub no longer accepts passwords for Git operations. Use a personal access token. See GitHub's guide.

output/ was committed by accident​

Add it to .gitignore, then remove it from Git tracking:

git rm -r --cached output/
git commit -m "Remove output from tracking"
git push

What's Next?​

Your project is on GitHub. Now let's deploy it to the cloud.

👉 Next: Deploy →