Created
July 29, 2025 13:07
-
-
Save poikilotherm/d98f9acffc6aeb2ca808c6c07f2d9345 to your computer and use it in GitHub Desktop.
Cherry pick and squash merge a feature branch for backporting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # feature-branch is a branch of develop-branch (so they are actually comparable) | |
| git log --cherry --clear-decorations --oneline --no-abbrev --reverse remote/feature-branch ^remote/develop-branch | cut -f2 -d" " | git cherry-pick --stdin -n | |
| git commit -m "chore: squash merge of cherry-picked remote/develop-branch" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment