
basic-git-standard-ops
Use for routine git operations in this repo (status, diff, checks, staging, commit, push) and GitHub
作者 Silviase|オープンソース
Basic Git Standard Ops
Overview
Use a consistent, low-risk git workflow for this repository.
Workflow
- Inspect state and diffs.
git status -sbgit diffgit diff --staged
- Run checks before staging or committing.
- Prefer:
uv run pre-commit run --all-files(runs ruff format/check, prettier, ty, unittest). - Otherwise:
uv run ruff format .,uv run ruff check .,uv run ty check src scripts,uv run python -m unittest
- Prefer:
- Stage intentionally.
- Use
git add -porgit add <paths>to keep commits scoped.
- Use
- Commit with clear, scoped messages.
- One logical change per commit; avoid mixing refactors, formatting, and behavior changes.
- If functionality or milestones change, update
docs/progress.md. - If updating planning docs, keep
docs/plan.mdfocused on goals/targets with explicit success criteria, and keepdocs/tasks.mdas a deeper breakdown of plan items. - When creating or revising plans, define concrete success criteria in
docs/plan.md.
- Push with the appropriate upstream.
git pushorgit push -u origin <branch>
- Use
ghfor GitHub operations beyond add/commit/push.- Issues:
gh issue create,gh issue view,gh issue close - PRs:
gh pr create,gh pr view,gh pr checkout,gh pr merge - Repo status:
gh repo view
- Issues:
Guardrails
- Do not commit secrets (Mapillary access tokens, API keys).
- Do not add generated content (
.venv,.ruff_cache, or large output dirs). - If pre-commit or formatters modify files, re-run checks and restage.