Skip to content

Sync feature branch with dev before committing in /ship to prevent merge conflicts #22

@sebastientaggart

Description

@sebastientaggart

Problem

When using /start → /ship sequentially on multiple tasks, merge conflicts consistently occur in generated files (e.g. adapter skill files produced by sync.sh).

The root cause: /ship commits and pushes without first syncing the feature branch with the latest dev. If dev has advanced (from a previously merged PR), the feature branch is stale, and the merge step fails with conflicts — even when the actual code changes are compatible.

Solution

Add a "sync with base branch" step in /ship between identifying the linked issue (Step 3) and committing (Step 4). This step runs git fetch origin <base> && git merge origin/<base> to bring the feature branch up to date before committing.

Using merge (not rebase) because it's safe in all cases: unpushed branches fast-forward cleanly, and branches with existing pushed commits get a clean merge commit without requiring force push.

Expected outcome

Sequential /start → /ship cycles no longer produce merge conflicts from stale feature branches.

Metadata

Metadata

Labels

bugSomething isn't workingready-for-qaIssue is ready to be QA tested

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions