name: pre-push-checklist description: Pre-commit/push checklist that reviews staged changes, syncs with upstream, runs spelling/grammar checks, runs all dev checks from the README, and generates a commit message. Use before committing and pushing.
Pre-Push Checklist
Understand Changes
- Look at the currently staged changes (
git diff --cached) to identify what was changed and why. - Check if there are changes to pull from upstream (
git fetch && git log HEAD..@{u} --oneline). If there are, sync carefully:- Stash the current changes (
git stash --include-untracked). - Pull from upstream (
git pull). - Re-apply the stash (
git stash pop) and resolve any merge conflicts that arise. Take great care to make sure none of the user's changes are lost.
- Stash the current changes (
Checks
- Review the staged diff for spelling and grammar mistakes in user-facing strings, comments, and documentation. Fix any found.
- Read the
README.mdand find the "## Development" section. Run each of the checks listed there. Fix any issues that are simple. If a fix would require more complex changes, stop and consult with the user before proceeding. - Commit up with a short commit message following the existing style of commit messages in the repo's git log. Place the commit message at the very end of your response.
Finally, commit and push the changes to the repo.