I have a single branch with commits for feature A, B, C, D. I have about 40 commits, and each of the commits are in mixed order. I have made a pull request, but I need to split up this branch into branch A, branch B, etc. with the commits associated with each feature. So feature A commits in branch A.
Unfortunately, i'm new to git and it still confuses me. How do you pull out the commits from a single branch and put them inside their own branch?
You can use git cherry-pick
Create new branch for feature A, checkout on it and use: git cherry-pick a_commit_hash.
Repeat it for all your commits
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