Let's say I have the following commits in my master:
master : ---A----B----C----D---E
Now I need to create new branch from commit A and include only changes in commit C
master : ---A----B----C----D---E
\
branch2 : \-------C
So I need to put in my branch2 commit C without B
How can I do that ?
Use cherry-pick
git checkout -b branch2 <shaSUM of A>
git cherry-pick <shaSUM of C>
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