suppose I have cherry-picked the commit comm1 from the master branch into branch foo. Will the commit comm1 be removed from the branch master after successful cherry-pick or it will be just copied into branch foo?
It will copy the commit's delta and create a new commit out of it in the active branch.
When you ask yourself questions about what Git will modify or not, keep in mind that you can only modify the active branch. So if your active branch is development and you are cherry-picking a commit from branch feature/test, you can only modify development and not feature/test. This way, you can deduce that the commit in feature/test will not be affected.
Simply saying it will merge the particular change (commit) into target branch. Merge doesn't affect the source branch so it will be definitely not deleted.
So when you do full merge later, git will already know that this change was already integrated and will skip it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With