Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 896
Nidhin S G Avatar asked Jun 15 '26 00:06

Nidhin S G


1 Answers

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>

like image 135
Philip Pittle Avatar answered Jun 17 '26 00:06

Philip Pittle



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!