Git merge Spaghetti - How to fix it?
It seems like we've done a bit of merge "spaghetti" with git.
We are new to this and would basically like to have the following branches
Master A - B - C
__//
Core / A - B - C - D - E - F
|
iPhone A - B - C
But it seems like at some point we merged master into core, then core back to master, then master back to core .. not sure what / how / why did this happen .. but I would love some help to put this back on track without messing around to开发者_运维百科o much !
Any help is appreciated.
So you want to linearize the "Core" branch? Why not just git rebase
it ?
Master A - B - C
__//
Core / D - E - F - G - H - I
|
iPhone J - K - L
git checkout core
git rebase C [where "C" is the sha1 of C]
If you see any conflict, do a git rebase --abort
to back to previous state.
精彩评论