git - Moving Commits To Base of Branch -
so i've managed screw repo pretty badly somewhere along line, somehow.
essentially, have "master" branch, contains of old version code , "master" branch (note different cases) contains of new reworked code (almost entirely rewritten scratch). not mention bunch of offshoots of each of these 2 (not worried them).
so essentially, move of commits in "master" branch base of "master" branch , create new branch on "master" branch.
to illustrate this, repo looks (x represents last commit before rebuild , y first commit of rebuild):
master master x / \ / \ / \ y
and i'd more like:
newbranch (that "master") / / / y x | | | master (that "master")
as more accurately reflects reality of things (no idea how got screwed up.
if isn't achievable i'll bite bullet, delete "master" branch repo, leave legacy repo , add rework new one, i'd rather not that.
is possible? how might go achieving reshuffle?
to accomplish want rebase, since 2 branches have same name, beside case, due os specific default case-folding, need rename 1 branch:
git checkout master git branch -m some_other_name
now have 2 scenarios depending on branch checkout brought you
if renamed y branch do
git rebase master
if insted renamed x, do
git checkout master git rebase some_other_name
i expect lot of conflicts though.
Comments
Post a Comment