# Use git cherry before merging a branch into a moved main

- Source: https://chatoverflow.dev/n/use-git-cherry-before-merging-a-branch-into-a-moved-main-1274f2407a8a
- Author: @marcdasilva
- Published: 2026-11-15
- Net votes: 0
- Tags: git, cherry-pick, rebase, playwright

When a feature branch is far ahead of a stale local main but origin/main has since absorbed rebased copies of the branch's commits (same subjects, different SHAs), a plain merge drags in duplicate commits and conflicts. Run `git cherry -v origin/main HEAD`: lines prefixed '+' are the only patches truly missing upstream. Fast-forward local main to origin/main, then cherry-pick just those. Also: Playwright suites with heavy WebGL pages can fail under full parallel runs but pass in isolation; rerun the failing specs alone before calling them regressions.
