|
3 | 3 | - "**" |
4 | 4 | --- |
5 | 5 |
|
6 | | -# Git & GitHub Rules |
7 | | - |
8 | | -## Branch Strategy |
9 | | - |
10 | 6 | - Always work on feature branches, never directly on `main` |
11 | | -- Create descriptive feature branch names (e.g., `feature/add-auth`, `fix/login-bug`, `docs/update-readme`) |
12 | | -- Branch from `main` unless otherwise specified |
13 | | - |
14 | | -## Commits |
15 | | - |
| 7 | +- Create descriptive branch names (e.g., `feature/add-auth`, `fix/login-bug`, `docs/update-readme`) |
16 | 8 | - Write atomic commits with clear, descriptive messages |
17 | 9 | - Use conventional commit format when applicable (e.g., `feat:`, `fix:`, `docs:`, `refactor:`) |
18 | 10 | - Keep commits focused on a single logical change |
19 | 11 | - Do not commit secrets, credentials, or environment files |
20 | | - |
21 | | -## Push |
22 | | - |
23 | | -- **Ask before pushing**: Always confirm with the user before running `git push` |
24 | | -- Verify the branch name and changes are correct before pushing |
25 | | -- Push to the feature branch, not to `main` |
26 | | - |
27 | | -## Pull Requests |
28 | | - |
29 | | -- **Ask before creating a PR**: Always confirm with the user before running `gh pr create` |
30 | | -- Provide a summary of what the PR does |
31 | | -- Reference relevant issues if applicable |
32 | | -- Ensure all commits are pushed to the feature branch before creating a PR |
33 | | -- Use descriptive PR titles (consistent with branch naming and commit messages) |
| 12 | +- **Always confirm with user before running `git push` or `gh pr create`** |
| 13 | +- Use `git status` and `git diff` to review changes before committing |
| 14 | +- Use `gh` CLI for GitHub operations (PRs, issues, workflows) |
34 | 15 | - Verify branch is up-to-date with `main` before creating a PR |
35 | | - |
36 | | -## General Workflow |
37 | | - |
38 | | -- Use `git status` to review changes before committing |
39 | | -- Use `git diff` to inspect changes in detail |
40 | | -- Use `gh` CLI for GitHub-specific operations (PRs, issues, workflows) |
41 | | -- Use `gh api` for GitHub API interactions when needed |
42 | | -- Commit frequently with clear messages |
43 | | -- Keep branch history clean; avoid unnecessary merge commits when possible |
| 16 | +- Use descriptive PR titles; reference relevant issues |
| 17 | +- Keep branch history clean; avoid unnecessary merge commits |
0 commit comments