Merge branch fix/git-merge-rules
Document no fast-forward merges and post-merge branch cleanup.
@@ -27,6 +27,27 @@ alwaysApply: true
27
27
- Commit frequently with focused messages; avoid one large commit at the end.
28
28
- Merge to `master` only after `cargo test` is green.
29
29
30
## Git merges
31
32
- **Never fast-forward.** Always create a merge commit:
33
```bash
34
git checkout master
35
git merge --no-ff feature/your-branch
36
```
37
- Do not use `git pull --ff-only` when integrating a merged feature branch into `master`.
38
39
## Branch cleanup
40
41
- After a successful merge to `master`, delete the local branch:
42
```bash
43
git branch -d feature/your-branch
44
```
45
- If a feature branch was pushed to the remote, delete it there too once merged:
46
```bash
47
git push origin --delete feature/your-branch
48
```
49
- Periodically prune stale remote-tracking refs: `git fetch --prune`
50
30
51
## Documentation
31
52
32
53
- See `.cursor/rules/documentation.mdc` for full doc-sync rules.
@@ -27,6 +27,27 @@ alwaysApply: true27
- Commit frequently with focused messages; avoid one large commit at the end.
27
- Commit frequently with focused messages; avoid one large commit at the end.
28
- Merge to `master` only after `cargo test` is green.
28
- Merge to `master` only after `cargo test` is green.
29
29
30
## Git merges
31
32
- **Never fast-forward.** Always create a merge commit:
33
```bash
34
git checkout master
35
git merge --no-ff feature/your-branch
36
```
37
- Do not use `git pull --ff-only` when integrating a merged feature branch into `master`.
38
39
## Branch cleanup
40
41
- After a successful merge to `master`, delete the local branch:
42
```bash
43
git branch -d feature/your-branch
44
```
45
- If a feature branch was pushed to the remote, delete it there too once merged:
46
```bash
47
git push origin --delete feature/your-branch
48
```
49
- Periodically prune stale remote-tracking refs: `git fetch --prune`
50
30
## Documentation
51
## Documentation
31
52
32
- See `.cursor/rules/documentation.mdc` for full doc-sync rules.
53
- See `.cursor/rules/documentation.mdc` for full doc-sync rules.