У меня есть следующее:
branch0 --- commit1 --- commit2 --- branch2 --- commit3
|
branch1
|
commit4
|
commit5
Я хотел бы изменить его на следующее (т.е. переместить все из commit1
):
branch0
|
branch1
|
commit4
|
commit5 --- commit1 --- commit2 --- branch2 --- commit3
Я пытался использовать rebase
и cherry-pick
, но я недостаточно осведомлен, поэтому любые предложения приветствуются.
Спасибо
ОБНОВЛЕНИЕ
Из ответа Мимикрии, приведенного ниже, я пытаюсь сделать следующее:
git checkout branch0
git checkout -b temp
git rebase branch1
## fix conflicts
git add .
git commit -am "rebase applied"
git rebase --continue
git branch -mv -f branch1
Я получаю следующую ошибку:
Неустранимый: Неверное имя ветви: 'HEAD'
git status
rebase in progress; onto 89844e6
You are currently rebasing branch 'temp' on '89844e6'.
(all conflicts fixed: run "git rebase --continue")