Search code examples
gitcherry-pickgit-squash

Cherry Pick a Squashed Commit


I have two main branches, staging and master. I have a few commits and I have pushed those changes to a branch say xyz whose base branch is staging and have created a pull request for staging branch. All these commits has been squashed into a single commit.

Is it possible to cherry pick this squashed commit and apply this cherry pick to a new branch started from master, so that I can create the same pull request to master branch also.


Solution

  • Is it possible to cherry pick this squashed commit and apply this cherry pick to a new branch started from master

    Yes: git cherry-pick <sha of squashed commit>