For some reason I want to abandon my branch_A but I have some files just committed in that branch_A. I want to add them to branch_B. How can I do that?
Switch on the branch B:
git checkout branch_B
Then, checkout the files you want to keep:
git checkout branch_A file1 file2 file3 [...]
At last, commit your changes
git commit -m "Backport changes from branch A for reasons"
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