У меня есть две ветви:Как разрешить конфликт во время rebase?
$ git branch
master
* readcode
я некоторые изменения привержен master
, поэтому я хотел бы принести изменения в readcode
отрасли. Тогда я использовал перебазироваться:
$ git rebase master
First, rewinding head to replay your work on top of it...
Applying: Health score enhancement.
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging file1
CONFLICT (content): Merge conflict in file1
Failed to merge in the changes.
Patch failed at 0001 Health score enhancement.
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".
В file1
, там было несколько линий конфликта. Я исправил конфликт в редакторе file1
. Но я обнаружил, что я не был в readcode
филиале в настоящее время:
$ git branch
* (no branch)
master
readcode
Но я все еще следовал за сообщением намека сделать:
$ git rebase --continue
file1: needs merge
You must edit all merge conflicts and then
mark them as resolved using git add
Затем используй мерзавец добавить и продолжить снова:
$ git add lib/nimbus/loadbalancer/lb.rb
$ git rebase --continue
Applying: Health score enhancement.
No changes - did you forget to use 'git add'?
If there is nothing left to stage, chances are that something else
already introduced the same changes; you might want to skip this patch.
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".
Какую команду я должен выполнить, чтобы сообщить git, что я разрешил конфликт, и продолжить переадресацию?
Как 'git rebase' сообщает вам, разрешите конфликты в файле1 и запустите' git add file1'. –
См. Мое обновление. Все еще не работает. – TieDad
Похоже на «Улучшение оценки здоровья». commit больше не нужен, возможно, потому что все его изменения были применены вверх по течению. Git не хочет создавать коммиты без дельта. Возвращает ли 'git diff' или' git diff --cached' какой-либо вывод? –