Git & GitHub for Data Analysts
Back to Git, GitHub, and a Polished Repo

Pushing Your Capstone to GitHub — Step by Step

The exact workflow to take your capstone notebook and get it onto a public GitHub repo using VS Code.

10 minutesInteractive tutorial
🎯 Free Guest Mode: You are learning for free. Sign in to save your completion progress and quiz answers.

This is the exact workflow to take your capstone notebook and get it onto a public GitHub repo — all using VS Code's interface.

Step 1 — Create the GitHub repo

  1. Go to github.com → new repo (or github.com/new).
  2. Name: descriptive, kebab-case. e.g. saas-churn-analysis.
  3. Description: 1 sentence — "Churn and retention analysis for a fictional SaaS company, capstone for Topfolio Data Analyst track."
  4. Set to Public. (Recruiters can't see private repos.)
  5. Don't initialize with a README from GitHub — we'll add ours locally.
  6. Click "Create repository".

GitHub now shows you a setup page. You'll see an HTTPS URL — https://github.com/your-username/saas-churn-analysis.git. Save this.

Step 2 — Set up your local folder

Make sure your capstone folder has:

  • Your notebook(s) (.ipynb files)
  • A README.md (write one — a good template is in the lessons above)
  • A .gitignore (template below)
  • Any small supporting data files (large datasets — keep them out of git)

Create a .gitignore

Inside your project folder, create a file named .gitignore with:

.ipynb_checkpoints/
__pycache__/
.DS_Store
.env
venv/
data/raw/
*.pkl

These patterns tell Git to ignore temporary and sensitive files.

Step 3 — Initialize Git in VS Code

  1. Open your capstone folder in VS Code
  2. Open the Source Control panel (Ctrl + Shift + G)
  3. Click "Initialize Repository"
  4. VS Code creates a .git folder — you're now tracking the project

Step 4 — Stage and commit locally

  1. In the Source Control panel, you'll see all your files under "Changes"
  2. Click the + icon next to each file (or "Stage All Changes" + at the top)
  3. Type a commit message in the box above: "Initial capstone: SaaS churn analysis"
  4. Click the checkmark icon (or press Ctrl + Enter)

Your files are now committed locally.

Step 5 — Publish to GitHub

  1. In the Source Control panel, click the "Publish Branch" button
  2. VS Code prompts you to sign in to GitHub (one-time OAuth in your browser)
  3. VS Code shows the repo URL you created in Step 1 — paste it
  4. Choose Public visibility (private repos can't be seen by recruiters)
  5. VS Code pushes your code and confirms success

One-time note: The first time, VS Code handles the OAuth authentication. After that, publishing and pushing work automatically.

Step 6 — Verify

Go to github.com/your-username/saas-churn-analysis. You should see:

  • Your files listed
  • Your commit message
  • Your notebook rendered in the browser — click on it to confirm cells display correctly

Step 7 — Link from your Topfolio profile

In your Topfolio settings, add the repo URL to your GitHub profile field. It'll show on your public portfolio page.

Step 8 — Add a topic + a description

On your GitHub repo page:

  • Click the gear icon next to "About" (top-right of the file list)
  • Description: 1-line "what is this"
  • Add 2-3 topics: data-analysis, python, saas-metrics, topfolio

Topics make the repo searchable when recruiters browse GitHub.

The recurring workflow

Every time you update your notebook after the initial push:

  1. Open the Source Control panel
  2. See your changes listed
  3. Type a meaningful commit message: "added cohort retention section"
  4. Click the checkmark to commit
  5. Click the sync icon in the status bar (bottom-left) to push

Aim for 3+ commits across the capstone build, not 1 giant commit at the end. Consistent commit history shows real work.

Common mistakes

  • Forgot to set the repo public. Recruiters can't see private repos.
  • Committed the API key accidentally. If this happens, rotate the key immediately — it's now exposed. Clean the history with BFG Repo-Cleaner.
  • One giant final commit. Looks like you copied from somewhere. Smaller commits = visible process in your GitHub contribution graph.
  • No README. A repo without a README looks abandoned. Write one — the template from these lessons covers it.

Takeaway

This workflow takes 10 minutes the first time. After that, the commit + sync loop is 30 seconds per session. Every working session, do it. Your GitHub contribution graph becomes part of your portfolio.

Question 1 of 5Answer saved0 answered

When creating the GitHub repo, what's the most important setting for an analyst's portfolio repo?