Compare commits

...

2 Commits

2 changed files with 48 additions and 0 deletions

View File

@ -60,3 +60,7 @@ Work types: configuration,
## 16:41 - Fix: UTC/CST timezone ambiguity in transaction freeze/thaw scheduling — utils/timezone.py
- **Type:** fix
- **Tags:** major-domo, timezone, transaction-freeze, production-fix, discord-bot, python, fix
## 16:41 - Rebase feature branch onto next-release before PR to avoid merge conflicts
- **Type:** procedure
- **Tags:** major-domo, git-workflow, next-release, rebase, discord-bot, procedure

View File

@ -0,0 +1,44 @@
---
id: c0239088-398b-4f72-9894-3caa2e385833
type: procedure
title: "Rebase feature branch onto next-release before PR to avoid merge conflicts"
tags: [major-domo, git-workflow, next-release, rebase, discord-bot, procedure]
importance: 0.6
confidence: 0.8
created: "2026-02-22T22:41:43.343387+00:00"
updated: "2026-02-22T22:41:43.343387+00:00"
---
# Rebase Feature Branch onto next-release Before PR
## Project
major-domo / discord-app-v2 (applies to all major-domo services)
## Context
The `next-release` staging branch accumulates changes from multiple PRs (security fixes, unused import cleanup, scorebug fixes, etc.) before being merged to `main`. Feature branches based off `main` can conflict with `next-release`.
## Procedure
```bash
# 1. Fetch latest remote state
git fetch origin
# 2. Rebase feature branch onto next-release
git rebase origin/next-release
# 3. Resolve any conflicts, then continue
git rebase --continue
# 4. Force-push to update the PR branch
git push --force-with-lease origin <feature-branch>
```
## Common Conflicts in This Repo
- Unused import cleanup PRs may remove imports that your branch re-introduces — add the import back after resolving
- Security fix PRs may have changed `except:` to `except Exception:` — accept theirs or merge carefully
- `tasks/transaction_freeze.py` is a frequent conflict hotspot
## Notes
- Use `--force-with-lease` (not `--force`) — safer, refuses to push if remote has unexpected commits
- After merging `next-release``main`, sync local main: `git reset --hard origin/main` if it has diverged from rebased commits
- If an import was removed as "unused" by a previous PR but your changes re-introduce usage, add it back explicitly — don't assume the cleanup branch was authoritative