Using two methods
Git cherry-pick one of the few very useful commands, useful for fetching one commit from another branch to yours. here’s how if you want to cherry-pick more than one commit.
Cherry-Pick Multiple Commit
Normal you can use this method, cherry-pick with multiple commit you can cherry-pick any number of commit hashes at once. This example by partial hash.
//commits one by one
$ git cherry-pick commit1 commit2 commit3 commit4 commit5example:
$ git cherry-pick 1e038f10 2f028f10 34138b11//commits by range
$ git cherry-pick A^..Bexample:
$ git cherry-pick 6653c90^..481981f
Use App (Sourcetree)
I prefer this method, and often use it too, you can check the changes that occurred in the commit. First thing to do is to use sourcetree Interactive rebase (Rebase children of -commit- interactively), squash commit what you want to joined.
Squash commits that you want to merge (Squash with previous) and then click “ok”. Don’t forget to edit the commit message.
force push you commit (example: $ git push -f origin branch/feature) after merging now cherry-pick from that branch to your branch.
(example: $ git cherry-pick 1e038f10)
Cancel Last Commit When Already push
This how I cancel last commit when it already push on gitlab, there a couple solution but this work for me , and follow…