首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >git Bug阻止合并

git Bug阻止合并
EN

Stack Overflow用户
提问于 2013-01-19 01:17:02
回答 1查看 1.4K关注 0票数 0

如何在git错误上执行git bisect或以其他方式恢复git索引。错误消息,然后在下面的修复程序中失败。

我和GIT_MERGE_VERBOSITY=5一起经营git merge origin master .

代码语言:javascript
复制
Merging:
9201eee porque no, "not and"
virtual origin
found 2 common ancestors:
21d206e (redo) merged in feature/edb and fixed the unit test. Also fixed a bug in bq where the imposition of the MIN_BUILDINGS constraint results in zero results, but an erroneous 'found_entities' field.
ac55def Merge pull request #276 from company/feature/chromeframe_support
  Merging:
  21d206e (redo) merged in feature/edb and fixed the unit test. Also fixed a bug in bq where the imposition of the MIN_BUILDINGS constraint results in zero results, but an erroneous 'found_entities' field.
  ac55def Merge pull request #276 from company/feature/chromeframe_support
  found 1 common ancestor:
  2f55197 Merge pull request #271 from company/feature/autobahn-host-as-setting
  Auto-merging requirements.unstable.txt
  Auto-merging requirements.txt
  Auto-merging project/tests/test_querier.py
  CONFLICT (content): Merge conflict in project/tests/test_querier.py
  Skipped project/static/project/images/bg-paper.png (merged same as existing)
  Skipped project/static/project/apps/scatter-plot/js/xcharts.custom.js (merged same as existing)
  Skipped edb/models.py (merged same as existing)
  CONFLICT (rename/rename): Rename "edb/migrations.broken/0006_auto__del_field_site_entity_id.py"->"edb/migrations/0012_lengthen_owner_type_and_rating_charfield.py" in branch "Temporary merge branch 1" rename "edb/migrations.broken/0006_auto__del_field_site_entity_id.py"->"edb/migrations/0005_change_site_id_to_site_entity_id.py" in "Temporary merge branch 2" (left unresolved)
  Skipped edb/migrations/0007_rvalue_changed_to_r_value.py (merged same as existing)
  Skipped edb/migrations/0004_regenerate_garbled_field_names_due_to_slashes_in_csv_header_strings.py (merged same as existing)
  Auto-merging BE/templates/base.html
BUG: There are unmerged index entries:
BUG: 1 edb/migrations.broken/0005_auto__add_field_site_id__chg_field_site_entity_id.py
fatal: Bug in merge-recursive.c
  • git reset --hard不起作用(后续的合并仍然失败)。
  • 无论向哪个方向合并(主->、分支或->天气),都会导致相同的错误。
  • 工作目录中不存在违规文件,但在使用edb/migrations.broken/签出主目录( rm -f )时删除了一个相关的空目录,git committed (但很明显,git记录了索引中的变化)修复了
  • 没有joy和git update-index --force-remove --unmerged --really-refresh --again --remove
EN

回答 1

Stack Overflow用户

发布于 2013-01-24 22:51:22

hub (github client)别名或已删除路径migrations.broken的.gitignore可能是git "bug“的来源。

代码语言:javascript
复制
alias git=git   # or `brew remove hub`
git rm -rf edb/migrations.broken
git commit -am 'delete non-existent path to update git index'
git push origin feature/edb
git pull origin master
git checkout master
git pull origin master
git rm -rf edb/migrations.broken
git commit -am 'delete non-existent path to update git index'
git push origin master
git checkout feature/edb
git merge master
git commit -am 'delete non-existent path to update git index'

许多这些命令(所有的rm -rf命令)都会导致对什么都不做或不存在的文件发出警告。但不知何故,它成功地消除了由混淆的git索引引起的错误。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14410135

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档