I branched from master and created a branch called extra_work. Then I made lots of changes to master which included removing some files as well. Later now when I tried to merge the branch 'extra_work' into the master, it is not merging it entirely. It is not adding the files that I removed in master, basically all the work that I had undone, now I want it back into my master. How do I merge these two branches so that all the extra files/work from my 'extra_work' branch merges into master. Thanks
Rebase your extra_work branch against master. This will rewind your extra_work branch to the state when you branched, and apply the commits from master to extra_work. It will then replay all the commits from extra_work back onto itself. If you inspect git log after that you will see the commits from master further back in the history of the branch. You should then be able to merge to master with no problems.
git rebase master
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