Problem
When a feature branch has already been pushed to origin for code review, the current wt step rebase workflow requires force-pushing after syncing with main, which rewrites shared history.
In traditional git workflows, once a branch is shared/pushed for review, the common practice is to merge main INTO the feature branch (rather than rebase) to avoid rewriting history and requiring force pushes.
Current workaround
Use plain git commands:
git fetch origin
git merge origin/main
Proposed solution
A new step command like wt step sync or wt step update that:
- Fetches from origin
- Merges the default branch (or specified target) INTO the current branch
- Preserves commit history (no rebase)
Example usage:
wt step sync # merge origin/main into current branch
wt step sync develop # merge origin/develop into current branch
Use case
- Create feature branch with
wt switch --create feature
- Work, commit, push for code review
- Main branch advances while PR is in review
- Need to sync with main → use
wt step sync instead of wt step rebase
- Push normally (no force push needed)
- When approved, use
wt merge as usual
This would complement the existing rebase-based workflow for scenarios where history preservation matters.
Problem
When a feature branch has already been pushed to origin for code review, the current
wt step rebaseworkflow requires force-pushing after syncing with main, which rewrites shared history.In traditional git workflows, once a branch is shared/pushed for review, the common practice is to merge main INTO the feature branch (rather than rebase) to avoid rewriting history and requiring force pushes.
Current workaround
Use plain git commands:
Proposed solution
A new step command like
wt step syncorwt step updatethat:Example usage:
Use case
wt switch --create featurewt step syncinstead ofwt step rebasewt mergeas usualThis would complement the existing rebase-based workflow for scenarios where history preservation matters.