Git and GitHub workflow
Remote: origin = https://github.com/TTT-b/stremio-ai-translator. Default branch: main. Windows PowerShell commands.
Start of work
git status -sbandgit fetch origin.- If the working tree is clean:
git pull --ff-only. If not clean, stop and tell the user what is modified.
While working
- Work on a branch for anything non-trivial:
git switch -c <short-name>. Small safe fixes may go straight tomainonly if the user says so. - Commit small, focused changes. Message:
vX.Y.Z: short summaryfor releases, otherwisetype: short summary(fix:,feat:,docs:,test:,chore:). - Stage files by name (
git add <file>), nevergit add .or-Ablindly. Checkgit diff --stagedfirst. - Never commit
.env,settings.json,data/,logs/,node_modules/,dist-electron/,release/, tokens, or API keys. If a secret was committed, stop and tell the user to rotate it. - Run
npm run checkbefore every commit. Do not commit while it fails.
Pushing
- Push only when the user asks. Normal push:
git push. Never--forceonmain. If a force push is truly needed on a personal branch, use--force-with-leaseand ask first. - Releases: bump
versioninpackage.json, update README/TROUBLESHOOTING if behavior changed, commit, thengit tag vX.Y.Zandgit push --follow-tagsonly after the user confirms. Each tag must point to its own commit.
Release checks (every release, not just when something looks wrong)
npm run checkpasses (it includes the test thatRELEASE_NOTEShas he + en notes for the version inpackage.json).- The version in
package.jsonis higher than the latest published tag (git tag --sort=-v:refname | Select-Object -First 1); the in-app updater only offers higher versions. - Build with
npm run distand have the user install it fromrelease/first; wait for their OK before publishing. - After publishing,
gh release view vX.Y.Zmust list the installer.exe, its.blockmapandlatest.yml. Withoutlatest.ymlthe in-app "check for updates" finds nothing. - Tell the user to press "Check for updates" in the previous version and confirm it offers the new one.
Syncing with the laptop/phone
- The desktop is the working machine. When the user says GitHub is updated:
git fetch origin, showgit log --oneline HEAD..origin/main, thengit pull --ff-only. If it cannot fast-forward, show the divergence and ask before merging or rebasing.
Recommended GitHub settings (user sets in the web UI)
Repo Settings -> Branches: protect main (require pull request, block force pushes, block deletion). Settings -> Code security: enable Secret scanning with push protection, Dependabot alerts, and Dependabot security updates. Settings -> General: enable "Automatically delete head branches". Account: turn on two-factor authentication.