Rebase safely with deep conflict resolution, run checks, and verify no unintended changes against default branch.
Rebase the current branch with deliberate conflict resolution, validation, and a final correctness pass against the default branch.
main/master)task is available and supports task rebase and task checkgit rev-parse --abbrev-ref HEAD.main or master, stop and ask for a feature branch.git status --porcelain --branch.git add -A.feat: rename opencode sessions on park.origin/HEAD, fallback master, then main.OLD_HEAD="$(git rev-parse HEAD)"BASE="<resolved default branch>"OLD_MERGE_BASE="$(git merge-base HEAD "$BASE")"git log --oneline "$OLD_MERGE_BASE"..HEADgit diff --stat "$OLD_MERGE_BASE"...HEADRun:
task rebase
If no conflicts occur, continue to Step 3.
For each conflicted file:
git status --short.:1:), current branch (:2:), and incoming branch (:3:).git show :1:<file>git show :2:<file>git show :3:<file>Cargo.toml), keep the single intended semantic version bump for the branch and avoid duplicate or accidental rollback bumps.git add <file>.After resolving a conflict batch, run focused validation relevant to touched areas when possible. Then continue rebase with:
git rebase --continue
If the continue step fails because the editor requires an interactive TTY, use:
GIT_EDITOR=true git rebase --continue
Repeat until the rebase completes.
Before full validation, normalize formatting for touched files using project tooling:
task fmt if available in the repository.nix develop -c cargo fmt) when applicable.cargo fmt.Then stage any formatting-only updates produced during conflict resolution.
Run:
task check
If task check fails, fix issues and rerun until it passes.
After validation passes, verify the tree is clean:
git status --porcelain
If output is non-empty:
task check.NEW_HEAD="$(git rev-parse HEAD)"NEW_MERGE_BASE="$(git merge-base HEAD "$BASE")"git range-diff "$OLD_MERGE_BASE".."$OLD_HEAD" "$NEW_MERGE_BASE".."$NEW_HEAD"git log --oneline "$NEW_MERGE_BASE"..HEADgit diff --stat "$NEW_MERGE_BASE"...HEADgit diff "$NEW_MERGE_BASE"...HEADReturn:
GIT_EDITOR=true) was requiredtask check result--no-verify