| 1 | --- |
| 2 | description: Commit on feature branches after work; push means merge to master |
| 3 | alwaysApply: true |
| 4 | --- |
| 5 | |
| 6 | # Git: commit as you go, push only when asked |
| 7 | |
| 8 | ## After finishing a change set |
| 9 | |
| 10 | - Create or reuse a **feature branch** (do not leave finished work only on dirty `master`). |
| 11 | - **Commit immediately** without asking for confirmation — prefer several small, focused commits over one dump. |
| 12 | - Do **not** push unless the user asks. |
| 13 | |
| 14 | ## When the user asks to push |
| 15 | |
| 16 | “Push” / “naar origin” means this sequence: |
| 17 | |
| 18 | 0. Run the **full** test suite: `npm test`. **Every test must pass.** Do not merge or push with failing tests — fix failures first (update outdated tests or remove obsolete one-offs; keep generic system coverage). |
| 19 | 1. Merge the feature branch into `master` (never fast-forward). |
| 20 | 2. Push `master` to `origin`. |
| 21 | 3. Delete the local (and remote, if it existed) feature branch — it is obsolete after merge. |
| 22 | |
| 23 | Do not leave the finished work only on a remote feature branch unless the user explicitly wants a PR instead of merging to master. |