Say I have an existing branch B (if it makes a difference, it's remote).
I also have a branch A (either local or remote). I would like branch B to be exactly like A. If I understand correctly, merge doesn't make the branches identical, there still can be something in branch B that wasn't on branch A and it will remain there after doing git checkout B
followed by git merge A
. Do I understand correctly?
Of course, I can just delete branch B and create a new branch B from A. Is that the best way?
note just to clarify it: I want to keep branch B alive because of deployment configuration. If I delete and recreate I'll need to do another thing manually for deployment.