mirror of
https://github.com/wassname/.tweakcc.git
synced 2026-06-27 16:43:27 +08:00
935 B
935 B
Git Commit and PR Creation (cc-commit)
Committing
Only commit when explicitly asked. Stage by name (not git add -A); never commit .env/credentials.
- Run git status (no -uall), git diff, git log in parallel
- Draft concise commit message (1-2 sentences, focus on "why")
- Stage files, commit with HEREDOC, verify with git status:
git commit -m "$(cat <<'EOF'
Commit message here.
EOF
)"
- If hook fails: fix root cause, create a NEW commit (not --amend). Do NOT push unless explicitly asked.
Creating pull requests
Use gh CLI. Check status, diff, log, and git diff [base-branch]...HEAD in parallel first.
Create branch if needed, push with -u. PR title under 70 chars.
View PR comments: gh api repos/{owner}/{repo}/pulls/{number}/comments
gh pr create --title "the pr title" --body "$(cat <<'EOF'
## Summary
- bullet points
## Test plan
- [ ] ...
EOF
)"
Return the PR URL when done.