У меня есть ветка git (называемая v4), которая была сделана из мастера буквально вчера. В master внесено несколько изменений, которые я хочу внести в v4. Итак, в v4 я попытался выполнить перебазирование с master, и один файл продолжает лажать: однострочный текстовый файл, содержащий номер версии. Это файл app / views / common / version.txt
, который перед перебазированием содержит следующий текст:
v1.4-alpha-02
Вот что я делаю:
> git rebase master
First, rewinding head to replay your work on top of it...
Applying: new version, new branch
error: patch failed: app/views/common/version.txt:1
error: app/views/common/version.txt: patch does not apply
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging app/views/common/version.txt
CONFLICT (content): Merge conflict in app/views/common/version.txt
Failed to merge in the changes.
Patch failed at 0001 new version, new branch
When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".
version.txt
сейчас выглядит так:
<<<<<<< HEAD:app/views/common/version.txt
v1.4-alpha-02
=======
v1.4-alpha-01
>>>>>>> new version, new branch:app/views/common/version.txt
Итак, я привел его в порядок, и теперь это выглядит так:
v1.4-alpha-02
, а затем я попытался продолжить: сначала я пытаюсь зафиксировать:
> git commit -a -m "merged"
# Not currently on any branch.
nothing to commit (working directory clean)
Не повезло. Итак, я пытался добавить файл:
git add app/views/common/version.txt
Нет ответа. Думаю, отсутствие новостей - это хорошие новости. Итак, я пытаюсь продолжить:
> git rebase --continue
Applying: new version, new branch
No changes - did you forget to use 'git add'?
When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".
Сейчас, после того, как мы все обдумали, что я бьюсь головой о стол.
Что здесь происходит? Что я делаю не так? Может ли кто-нибудь меня исправить?
РЕДАКТИРОВАТЬ - для unutbu
Я изменил файл, как вы предлагали, и получил ту же ошибку:
> git rebase master
First, rewinding head to replay your work on top of it...
Applying: new version, new branch
error: patch failed: app/views/common/version.txt:1
error: app/views/common/version.txt: patch does not apply
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging app/views/common/version.txt
CONFLICT (content): Merge conflict in app/views/common/version.txt
Failed to merge in the changes.
Patch failed at 0001 new version, new branch
When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".