I am relatively new to Git, and I\'m still not very comfortable with it. Right now, I\'m looking for the command/options/magic that can make the current branch look like anothe
The accepted answer ("Branches are just pointers ...") is no good for me, because not only do I need my branch to look like another branch - I need to do so by only apply another commits (not losing any of the commits in the current history of my branch).
I liked this approach for making branch A
look like branch B
:
git checkout B
git diff A > patch_to_make_A_like_B
git checkout A
git apply patch_to_make_A_like_B
(And rm patch_to_make_A_like_B
at the end.)