Подтвердить что ты не робот

Невозможно разрешить конфликт переустановки

foo:/opt/bar$ git status
# On branch develop
nothing to commit (working directory clean)

foo:/opt/bar$ git pull --rebase origin develop
From ssh://xxx/yyy
* branch develop -> FETCH_HEAD
First, rewinding head to replay your work on top of it...
Applying: Subscription logging added.
Using index info to reconstruct a base tree...
<stdin>:120: trailing whitespace.
* @return integer
<stdin>:143: trailing whitespace.
* @return integer
<stdin>:166: trailing whitespace.
* @return integer
<stdin>:189: trailing whitespace.
* @return integer
<stdin>:212: trailing whitespace.
* @return integer
warning: squelched 3 whitespace errors
warning: 8 lines add whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging app/config/config.yml
CONFLICT (content): Merge conflict in app/config/config.yml
Failed to merge in the changes.
Patch failed at 0001 Subscription logging added.

When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To check out the original branch and stop rebasing run "git rebase --abort".

foo:/opt/bar$ git status
# Not currently on any branch.
# Unmerged paths:
# (use "git reset HEAD <file>..." to unstage)
# (use "git add/rm <file>..." as appropriate to mark resolution)
#
# both modified: app/config/config.yml
#
no changes added to commit (use "git add" and/or "git commit -a")

foo:/opt/bar$ git add -A

foo:/opt/bar$ git status
# Not currently on any branch.
nothing to commit (working directory clean)

foo:/opt/bar$ git rebase --continue
Applying: Subscription logging added.
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 check out the original branch and stop rebasing run "git rebase --abort".

foo:/opt/bar$ git add -A

foo:/opt/bar$ git status
# Not currently on any branch.
nothing to commit (working directory clean)

foo:/opt/bar$ git rebase --continue
Applying: Subscription logging added.
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 check out the original branch and stop rebasing run "git rebase --abort".

foo:/opt/bar$
4b9b3361

Ответ 1

Вы на правильном пути. Вам просто нужно использовать пропустить фиксацию, на которой у вас есть проблемы:

git rebase --skip

Вы устранили конфликт, но это не привело к изменениям по сравнению с предыдущим фиксацией. В этом случае вы не можете просто git rebase --continue, потому что вы сообщаете Git создать пустую фиксацию, которая не разрешена.

Если у вас есть конфликты для любых других коммитов, вы все равно должны использовать git rebase --continue.

Опция --skip также полезна, когда вы не хотите включать определенную фиксацию вообще во вновь созданную историю.

Ответ 2

git rebase --skip действительно является правильным решением, за исключением случая, когда он застрял и не сможет продолжить текущую перезагрузку.

Git 2.0.2 (июль 2014 года) исправил эту ошибку: см. совершить 95104c7 brian m. carlson (bk2204):

rebase--merge: исправить --skip двумя конфликтами в строке

Если git rebase --merge столкнулся с конфликтом, --skip не будет работать, если следующий коммит также противоречит.
Файл msgnum никогда не будет обновляться с новым номером патча, поэтому патч не будет пропущен, что приведет к циклу inescapable.

Обновите значение файла msgnum в качестве первой вещи в call_merge.
Это также позволяет избежать сообщения "Already applied" при пропуске фиксации.
Нет видимых изменений для других контекстов, в которых вызывается call_merge, поскольку Значение msgnum в этих ситуациях остается неизменным.