Git rebase失败,'您对本地文件的更改将被合并覆盖'。没有本地更改? [英] Git rebase fails, 'Your local changes to the following files would be overwritten by merge'. No local changes?

查看:366
本文介绍了Git rebase失败,'您对本地文件的更改将被合并覆盖'。没有本地更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的转录本,试图将我的bugfix分支合并到我的主分支上,准备将其推向上游。自从bugfix分支被创建以来,已经有一些上游的变化被拉入master,并且它现在拒绝rebase。



打开时,引发错误的文件不会被区分。没有文件被添加,删除或重命名。没有任何东西被忽略,没有任何东西没有被追踪或者上演或者未被开始。我完全被困在为什么rebase失败。



我在OS X 10.6.6和git 1.7.4上

  .-(/ Volumes / joshua / www / txfunds)---------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------(joshua @ Kusanagi) -  
` - > git rebase bug586-test master-test
首先,倒带头重放你的工作...
应用: - 与api权限相关的comiitting代码
使用索引信息重建基本树...
回退到补丁库和3路合并...
错误:您对以下文件的本地更改将被合并覆盖:
inc / data.inc
模板/ apipermissions_tpl.inc
模板/ currency_tpl.inc
请在提交您的更改或隐藏它们后再进行合并。
正在中止
未能在变更中合并。
修补程序在0001失败 - 与api权限相关的comiitting代码

当您解决此问题时,请运行git rebase --continue。
如果您希望跳过此修补程序,请运行git rebase --skip。
恢复原始分支并停止重新分配运行git rebase --abort。



.-(/ Volumes / joshua / www / txfunds)---------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------(joshua @ Kusanagi) -
` - > git status
#目前没有任何分支。
没有提交(工作目录清理)



.-(/卷/ joshua / www / txfunds)---------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------(joshua @ Kusanagi) -
` - > git rebase --abort
HEAD现在处于5efccf1 - 与api权限相关的comiitting代码


$ b .-(/ Volumes / joshua / www / txfunds) - -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ----------------------------(joshua @ Kusanagi) -
` - > git log -n10 --oneline
5efccf1 - 与api权限相关的comiitting代码
a8a5ee4 IE
的风格变更cfca618 IE
的风格变更8a69de6 IE
的风格变更8946585 - 与api权限相关的comiitting代码 - 修正货币模板中的html错误
5fba0a9将1.11b分支错误修正和更改合并到主干
ef57049 Andrew代表Blake代表他对转移进行的更改;也是Indue GW平衡修正; debitcarupload修复LSN
69e4313解决了电子邮件支持问题
9058fb6将svn属性svn:eol-style设置为LF,以强制执行unix样式行结尾
240839e修复了很多空白问题。



.-(/ Volumes / joshua / www / txfunds)---------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------(joshua @ Kusanagi) -
` - > git checkout bug586-test
转换到分支'bug586-test'



.-(/ Volumes / joshua / www / txfunds)----- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ------------------------(joshua @ Kusanagi) -
` - > git log -n10 --oneline
b7b1f8a解决方案#586,存回发放
5fba0a9将1.11b分支错误修正和更改合并到主干
ef57049 Andrew代表Blake代表他对转移进行的更改;也是Indue GW平衡修正; debitcarupload修复LSN
69e4313解决了电子邮件支持问题
9058fb6将svn属性svn:eol-style设置为LF,以强制执行unix样式行结尾
240839e修复了很多空白问题。
cf27b6f - 传输过程中出现的错误。转移页面有一个叫做to的隐藏字段,它优先于卡片和用户卡片,这会导致系统出错
7c21a81修复#603,新增加的交易表格,记入日志。
01e6292删除一堆资源分支
880c5bc - 传输过程中出现的错误。转移页面有一个叫做to的隐藏字段,它优先于卡片和用户卡片,这会使系统出现一点点



.-(/ Volumes / joshua / WWW / txfunds)---------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ---------------------------------(joshua @ Kusanagi) -
` - > git rebase master-test bug586-test
首先,倒带头重播你的作品...
应用:解决#586,回寄保存
使用索引信息重建基本树...
:52:尾随空格。
'name'=> '发票转出',
:175:尾随空格。

警告:2行添加空格错误。
回退到补丁库和3路合并...
错误:对下列文件的本地更改将被合并覆盖:
templates / deposit_tpl.inc
请,在您可以合并之前提交您的更改或隐藏它们。
正在中止
未能在变更中合并。
修补程序失败,在0001解决#586,回寄保存

当你解决这个问题时,运行git rebase --continue。
如果您希望跳过此修补程序,请运行git rebase --skip。
要恢复原始分支并停止重新分配运行git rebase --abort。



.-(/ Volumes / joshua / www / txfunds)---------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------(joshua @ Kusanagi) -
` - > git rebase --abort
HEAD现在在b7b1f8a解决#586,寄存在


解决方案

这是与我的另一个问题重新解决问题相同的答案。



我在Mac上,而且这个晦涩难懂

  git config --global core.trustctime false 

我认为这是与windows文件时间,linux文件时间和mac文件时间之间的区别。谁知道,如果你愿意的话可以随时发表评论。

更新:这篇博文解释了发生了什么,有点。


Here is my transcript from trying to merge my bugfix branch onto my master branch in preparation to push it upstream. There have been some upstream changes pulled into master since the bugfix branch was created, and it now refuses to rebase.

The files it throws errors on are not diffed when opened. no files have been added, removed or renamed. Nothing is ignored and nothing is untracked or staged or unstaged. I'm completely stumped as to why the rebase is failing.

I'm on OS X 10.6.6 and git 1.7.4

.-(/Volumes/joshua/www/txfunds)-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(joshua@Kusanagi)-
`--> git rebase bug586-test master-test
First, rewinding head to replay your work on top of it...
Applying: - comiitting code related to api permissions
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
error: Your local changes to the following files would be overwritten by merge:
    inc/data.inc
    templates/apipermissions_tpl.inc
    templates/currencies_tpl.inc
Please, commit your changes or stash them before you can merge.
Aborting
Failed to merge in the changes.
Patch failed at 0001 - comiitting code related to api permissions

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".



.-(/Volumes/joshua/www/txfunds)-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(joshua@Kusanagi)-
`--> git status
# Not currently on any branch.
nothing to commit (working directory clean)



.-(/Volumes/joshua/www/txfunds)-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(joshua@Kusanagi)-
`--> git rebase --abort
HEAD is now at 5efccf1 - comiitting code related to api permissions



.-(/Volumes/joshua/www/txfunds)-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(joshua@Kusanagi)-
`--> git log -n10 --oneline
5efccf1 - comiitting code related to api permissions
a8a5ee4 Style changes for IE
cfca618 Style changes for IE
8a69de6 Style changes for IE
8946585 - comiitting code related to api permissions - fixed an html error in the currencies template
5fba0a9 Merges the 1.11b branch bugfixes and changes into trunk
ef57049 Andrew Commiting on Blakes behalf on changes he made to transfers; Also an Indue GW balance fix; debitcarupload fix for LSN
69e4313 Fixed an issue with Support From email
9058fb6 Sets the svn property svn:eol-style to LF, to enforce unix style line endings
240839e Fixes up a lot of the whitespace issues.



.-(/Volumes/joshua/www/txfunds)-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(joshua@Kusanagi)-
`--> git checkout bug586-test 
Switched to branch 'bug586-test'



.-(/Volumes/joshua/www/txfunds)-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(joshua@Kusanagi)-
`--> git log -n10 --oneline  
b7b1f8a Resolves #586, Postback on deposit
5fba0a9 Merges the 1.11b branch bugfixes and changes into trunk
ef57049 Andrew Commiting on Blakes behalf on changes he made to transfers; Also an Indue GW balance fix; debitcarupload fix for LSN
69e4313 Fixed an issue with Support From email
9058fb6 Sets the svn property svn:eol-style to LF, to enforce unix style line endings
240839e Fixes up a lot of the whitespace issues.
cf27b6f - bug that came up with transferring. The transfer page had a hidden field called to, which was taking precedence over cards and usercard which would throw the system out a bit
7c21a81 Fixes #603, new add transaction form, journalled.
01e6292 Removes a pile of resource forks
880c5bc - bug that came up with transferring. The transfer page had a hidden field called to, which was taking precedence over cards and usercard which would throw the system out a bit



.-(/Volumes/joshua/www/txfunds)-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(joshua@Kusanagi)-
`--> git rebase master-test bug586-test
First, rewinding head to replay your work on top of it...
Applying: Resolves #586, Postback on deposit
Using index info to reconstruct a base tree...
<stdin>:52: trailing whitespace.
                'name' => 'Invoice Transfer Out', 
<stdin>:175: trailing whitespace.

warning: 2 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:
    templates/deposit_tpl.inc
Please, commit your changes or stash them before you can merge.
Aborting
Failed to merge in the changes.
Patch failed at 0001 Resolves #586, Postback on deposit

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".



.-(/Volumes/joshua/www/txfunds)-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(joshua@Kusanagi)-
`--> git rebase --abort
HEAD is now at b7b1f8a Resolves #586, Postback on deposit

解决方案

This is the same answer as another one of my questions re git troubles.

I'm on a mac, and this obscure config change seemed to fix all my woes regarding unstaged changes when there were none.

git config --global core.trustctime false

I think it's to do with differences between windows file times, linux file times and mac file times. who knows, feel free to comment if you do.

Update: This blog post explains what's going on, sort of.

这篇关于Git rebase失败,'您对本地文件的更改将被合并覆盖'。没有本地更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆