Conventional commits, branch strategy, PR workflow with gh CLI and lazygit
Format: type(scope): description
Types and when to use them:
feat — new user-facing capabilityfix — bug fixrefactor — restructuring without behaviour changeperf — measurable performance improvementtest — adding or fixing tests onlychore — tooling, deps, config with no production impactci — CI/CD pipeline changesdocs — documentation onlyRules:
! after type or BREAKING CHANGE: footerfeat/short-description
fix/issue-or-description
chore/what-is-changing
gh pr create --title "feat(scope): description" --body "$(cat <<'EOF'
## Summary
- What changed and why
## Testing
- How to verify
EOF
)"
gh pr view --web # open in browser
gh pr checks # check CI status
gh pr merge --squash # squash merge when ready
# Interactive rebase to clean up before PR
git rebase -i origin/main
# Amend last commit (unpushed only)
git commit --amend --no-edit
# Stash with a name
git stash push -m "wip: description"
# Find when a line was introduced
git log -S "search string" --source --all
space to stage/unstagec to commitP to push, p to pulli for interactive rebasee to open file in $EDITOR