Git Workflow
Branching Model
Never commit directly to main. All work happens on a feature branch.
Branch naming:
feat/<name>- new featurefix/<name>- bug fixtest/<name>- tests onlyrefactor/<name>- refactoring, no behavior changedocs/<name>- documentation only
git checkout -b feat/my-feature
Commit Conventions
- One logical change per commit
- Imperative mood:
add,fix,remove,update, notaddedoradds - Prefix:
feat:,fix:,test:,refactor:,docs:,bump: - Keep subject line under 72 characters
Examples:
feat: add IEEE source with RSS feed
fix: exclude br from Accept-Encoding header
test: regression tests for bundle expansion
docs: rewrite developer guide for pipx install
bump: version to 1.0.31
PR Process
- Branch from
main - Make changes, commit frequently
- Push branch:
git push -u origin feat/my-feature - Open PR against
mainviagh pr create - All tests must pass before merge
- Merge locally or via GitHub - delete branch after merge
Push Rules
- Never force-push
main - Never skip hooks (
--no-verify) without explicit reason - Never amend a commit that has already been pushed (create a new commit instead)
Tagging and Releases
Tag format: v1.2.3
git tag v1.0.31
git push origin main && git push origin v1.0.31
Pushing a v* tag triggers GitHub Actions → PyPI publish automatically.
See docs/developer/release.md for full release checklist.
GitHub Authentication
GitHub remote uses HTTPS. Credentials are stored in macOS Keychain after the first successful push - no password prompt on subsequent pushes.
git remote -v
# must show: https://github.com/stayukasabov/capcat.git
# If wrong, restore:
git remote set-url origin https://github.com/stayukasabov/capcat.git
Credential helper (set once per machine):
git config --global credential.helper osxkeychain