docs(workflow): require branch deletion after rebase-merge
This commit is contained in:
@@ -30,6 +30,31 @@ Then:
|
||||
- Preferred PR strategy: **Rebase and merge**
|
||||
- Avoid merge commits unless explicitly required for a special case
|
||||
|
||||
## Post-merge branch cleanup (required)
|
||||
|
||||
After PR merge, delete the branch on both remote and local:
|
||||
|
||||
```bash
|
||||
# from repo root
|
||||
|
||||
git checkout main
|
||||
git pull --rebase
|
||||
|
||||
# delete remote branch
|
||||
|
||||
git push origin --delete <branch-name>
|
||||
|
||||
# delete local branch
|
||||
|
||||
git branch -d <branch-name>
|
||||
```
|
||||
|
||||
If branch was not merged cleanly and Git blocks deletion, inspect first; only then force-delete local branch with:
|
||||
|
||||
```bash
|
||||
git branch -D <branch-name>
|
||||
```
|
||||
|
||||
## Branch naming
|
||||
|
||||
- `fix/...` for bugfixes
|
||||
|
||||
Reference in New Issue
Block a user