Skip to content

Git and saving your work

Stop building straight on the live site

Every change goes to main and straight to production, tested by your users.

What you get
A simple routine: a branch per change, a preview link, then merge.
Paste it into
Your AI tool, in your project
The prompt
Right now I push every change straight to the live site. Set me up with a safer routine that's still simple for one person.

Look at how this project deploys. Then set it up so the main branch always matches what's live, each change happens on its own short-lived branch, the host builds a preview link for that branch, and I merge only after checking the preview. Add a check that runs the build, lint and tests before a merge, if the repository host offers that for free.

Write the routine as six lines in the README with the exact commands. Tell me the settings to switch on in my host and repository dashboards.

Use it

Open your AI tool (Claude Code, Codex or Cursor) in your project folder and paste it in.

More in Git and saving your work