I’ve done a bunch of rebasing on a test GIT branch. The rebasing was done for two reasons: #1: to integrate changes in a parent git-svn trunk; #2: to clean up my local history in preparation for handing off the code to another developer.
I have my test branch the way I want it, all tests are passing, etc. Now I want to make master look just like my test branch.
What’s the preferred way to do this? If master weren’t there already, I’d just git clone it, but is there another better way to force an existing branch to look just like anohter (including history)?
Deleting the branch and recreating it where you want it does work, but it costs you your reflogs – the record of where the branch has pointed in the past. The two cleaner ways: