module 07 github publishing

Commit, push, deploy

System Text-to-Speech Ready
Slide: 0:00 / 0:00
Slide 1 of 0Interactive Deck

Full Lesson Reference

Every change you make to files in a repo is a commit. Every commit goes to GitHub via a push. Every push to a Pages repo triggers a deploy. Claude handles all of this.

The default command

When you're done with work and want it backed up + deployed:

Commit and push everything we changed this session.

Claude

  1. Lists the files that changed
  2. Writes a commit message summarising the work
  3. Commits (saves the snapshot)
  4. Pushes (sends to GitHub)
  5. If it's a Pages repo, tells you the live URL where the page deploys

30 seconds. Done.

What good commit messages look like

Good messages are clear, prefix-coded, and describe WHY not just WHAT:

Add: Q2 weekly report for client acme

Fix: ROAS calculation in monthly dashboard (was using revenue not profit) Update: email voice guide with 3 new patterns from the latest campaign

Remove: deprecated tracking pixel from landing pages

Prefix es: Add (new), Fix (bug), Update (enhance), Remove (delete), Security (security-related).

Claude writes messages in this style automatically if your CLAUDE.md says so. If it's not doing that, add to your global CLAUDE.md:

Commit messages: action prefix + clear description (Add:, Fix:, Update:, Remove:, Security:). Focus on WHY not WHAT.

Committing frequently vs at end of session

Two approaches

Commit at end of session (simpler)

Work on files all session. At /wrapup, commit + push everything in one commit. Good for solo work where you don't need granular version history.

Commit after each meaningful change (more professional)

Finished the report draft? Commit. Fixed a bug? Commit. Added a section? Commit. Gives you more version history granularity. Better if you might need to roll back individual changes.

Tell Claude your preference once in CLAUDE.md

Commit frequently - after each meaningful change, not in bulk at the end.

Or

Commit at session end only - one commit per /wrapup.

Deploying to live URL

For Pages repos, pushing IS the deploy. GitHub detects the push, runs a deploy action, and updates your live URL in about 60 seconds.

To get the URL

What's the live URL for the [file] I just pushed?

Claude maps the file path to the deployed URL.

To check deploy status

Check the GitHub Actions status for my last push. Has the deploy completed?

Claude queries GitHub for the workflow status. If failed, Claude tells you what broke.

Rolling back a change

Pushed something wrong? Not a problem

Roll back the last commit. Don't lose the file changes - just undo the commit so I can fix it before re-committing.

Or for a total roll-back

Revert to the state before the last commit. Discard the changes entirely.

Use the second one carefully - it deletes work. Usually you want the first one.

When push fails

Sometimes pushes fail because someone else pushed changes since your last pull (you can't push over newer commits).

Tell Claude

Pull the latest changes, then push my work. Claude pulls (downloads the newer commits), tries to merge them with yours, and pushes the combined result. If there's a conflict, Claude asks you how to resolve.

Power-user tips

  • /wrapup commits for you - you don't have to remember to commit separately if /wrapup is your last step. It handles commit + push automatically.
  • Never force push to main - rewrites history, breaks stuff for anyone else working in the repo. Tell Claude to commit new changes instead.
  • Descriptive branch names if you branch - client-acme-q2-report not new-branch. Helps future-you.
  • Tag milestones - tell Claude "tag this commit v1.0 for the Q2 report published version". Tags are searchable, lets you find specific deployed versions.
  • Check git log periodically - "show me the last 10 commits" - reminds you what you've been doing

Action items

☐ Add commit message conventions to your global CLAUDE.md (Add/Fix/Update/Remove)

☐ Decide: commit frequently or at session end - set it in CLAUDE.md

☐ Test the workflow: make a change, tell Claude to commit + push, confirm the live URL updates

☐ Know how to roll back the last commit if needed

Next lesson: Encryption for client-facing pages.

Exercises

  1. Review the concepts covered in this lesson: Commit, push, deploy.
  2. Write down your key takeaway from this lesson.
  3. Practice running any commands or prompts mentioned above inside your terminal.