我想重新绑定我的开发分支上的一个功能分支,但是我得到下面的错误。我不确定,但我认为这发生在我将文件从一个文件夹移动到另一个文件夹时。那些抱怨的文件没有在分支上做出任何改变,因此我不确定问题所在。这最初发生在git 2.2.2;我只是尝试升级到2.5.0,它仍然在发生。Git Rebase报告错误,但没有什么要修复
如果我忘记了rebase,并将我的功能分支合并到develop分支中,那么一切正常。 Git将功能分支与开发分支合并没有问题。
有没有人对我如何完成rebase有任何建议?我尝试使用git rebase --skip
选项,但是这导致了一堆代码(据推测其他提交)被删除。
First, rewinding head to replay your work on top of it...
Applying: Entries now populate the Schedule A table when a calendar day is clicked; other refactoring
Applying: Introduce DailyLog
Using index info to reconstruct a base tree...
<stdin>:37: trailing whitespace.
@function_groups = current_user.organization.visible_function_groups
<stdin>:82: trailing whitespace.
if @entry.save
<stdin>:111: trailing whitespace.
# for a given day.
<stdin>:136: trailing whitespace.
self.create(user: user, created_at: the_date_time, organization_id: user.organization.id,
<stdin>:383: trailing whitespace.
</div>
warning: squelched 13 whitespace errors
warning: 18 lines add whitespace errors.
Falling back to patching base and 3-way merge...
error: Your local changes to the following files would be overwritten by merge:
app/views/entries/_entry_form_activity.html.erb
app/views/entries/_entry_form_employee_info.html.erb
app/views/entries/_entry_form_other_info.html.erb
app/views/entries/_entry_form_production_info.html.erb
app/views/entries/_entry_form_time_codes.html.erb
app/views/entries/create.js.erb
app/views/entries/edit.html.erb
Please, commit your changes or stash them before you can merge.
Aborting
Failed to merge in the changes.
Patch failed at 0002 Introduce DailyLog
The copy of the patch that failed is found in:
/home/slopeuser/Documents/dev/estat/.git/rebase-apply/patch
When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
你的工作目录是否干净?错误是告诉你,git找到的文件没有提交,他们会丢失。 – blashser
是的,这也是我的错误听起来像。开发和功能分支都通过'git status'进行检查,并且没有未提交的更改。 – CodeSmith
是的,但是你可以在你的'.gitignore'中有这些文件(我猜测)你没有看到它们在'git status'中,但它们存在。然后,当git尝试创建这些文件时,它会报告错误。试试这个:用两个分支克隆你的repo,并在一个新的“干净”回购中尝试rebase。 – blashser