Your code needs a home besides your laptop.
Everything so far has lived only on your machine. This lesson connects it to a remote host
— GitHub or GitLab — so your history is backed up, your work is shareable, and a
simple git push can trigger a real, live deploy.
Pick a host: GitHub or GitLab
Both do the same core job — store your Git history remotely, give you a web UI, and connect to deploy tools. Pick one; you can always change your mind later.
The largest ecosystem by far — what most tutorials, templates, and AI coding agents assume by default when they say “push this to GitHub.” Free private repos, built-in CI with Actions, and the account most collaborators already have.
Does everything GitHub does — free private repos, built-in CI/CD — and this
project's own home, gitlab.com/eim_opensource/gravity-python. Worth
knowing if you ever need to self-host your own Git server.
Create repos from the terminal
The official CLI turns “open the website, click New, copy a URL, come back to the terminal” into one command.
brew install gh gh auth login gh repo create my-gravity-site --private --source=. --push
brew install glab glab auth login glab repo create my-gravity-site --private
Connecting your local code: OAuth vs. an SSH key
Before your terminal is allowed to push anything, it has to prove it's you. Two ways to do that — you only need one.
brew install gh gh auth login
ssh-keygen -t ed25519 -C "you@example.com" cat ~/.ssh/id_ed25519.pub
GitHub — once you're logged in:
GitLab — once you're logged in:
Stage it, commit it, push it
You're connected and authenticated — but nothing goes anywhere until you run this loop. It's the same handful of steps every time, whether you or an AI agent made the change.
Git sees you changed something, but hasn't been told to save it yet. This is where every edit starts — yours or an AI agent's.
You've told Git “this is what goes in my next commit.” One command moves a change from unstaged to staged.
git status git add . git commit -m "Describe what changed" git push
git statussee what's unstagedgit add .stage everything — or git add <file> for just onegit commit -m "..."save a snapshot of what's stagedgit pushsend your commits to GitHub or GitLabbrew install --cask github-desktop
brew install git-gui
git gui — stage & commit
Run git gui from inside your repo. Unstaged changes sit on
top, staged ones below — click a file to stage it (same as
git add), type a message, click Commit.
Push it from the Remote menu, or fall back to
git push in the terminal.
gitk — view history
Run gitk for a visual graph of every commit on this branch
— or gitk --all to see every branch at once. Click any
commit to see exactly what it changed.
Push a branch, get a deploy — for free
The Get Started lesson had you run make deploy-vercel by hand. Connect your repo instead, and that git push you just ran does the same thing automatically — no command needed.
You run a command. Every time. Nothing happens until you do.
git push to main — it's live in about a minute. No command to remember.
The connection is one-time, made in Vercel's dashboard (Cloudflare Pages and Netlify work the same way):
From then on, every push to main is a new production deploy, and
every push to any other branch gets its own preview URL — so you (or a
client) can see a change before it goes live.
Connect this repository to Vercel: import it as a new project in the Vercel dashboard, keep the default build settings, and confirm the production branch is main. Once that's done, tell me exactly what happens the next time I run `git push`.