【问题标题】:Git rebase issue with files of same name but different case具有相同名称但大小写不同的文件的 Git rebase 问题
【发布时间】:2012-01-26 03:12:16
【问题描述】:

我对 Git 还很陌生,我在执行变基时遇到了问题,它似乎显示了一个文件...

创建.sql

还有一个文件

创建.sql

Create.sql 没有暂存,并且在物理上不再存在,但是我无法继续使用变基...当我尝试 git rebase --continue 我得到以下...

$ git rebase --continue
KeyBlade/KeyBlade.Database/_Pending/Create.sql: needs update
You must edit all merge conflicts and then
mark them as resolved using git add

Git 状态显示如下...

/c/src/git ((c3760e6...)|REBASE)
$ git status
# Not currently on any branch.
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#       modified:   KeyBlade/KeyBlade.Database/_Pending/create.sql
#
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#       modified:   KeyBlade/KeyBlade.Database/_Pending/Create.sql
#

我不确定发生了什么,但如果有人能阐明我如何解决这个问题,将不胜感激。

【问题讨论】:

  • 您使用的是哪个操作系统和文件系统?
  • 我使用的是 Windws 7 - NTFS 文件系统

标签: git


【解决方案1】:

对于遇到此问题的其他人,我在以下站点上找到了帖子...

https://tortoisegit.org/issue/830

简而言之,如果你有一个文件名 foo.txt,然后它与一个名为 Foo.txt 的文件冲突,你可以使用以下 git 命令

git mv foo.txt Foo.txt --force

这解决了我的问题

【讨论】:

  • 如果以后遇到 case 错误,可以运行以下 git 命令... git config --global core.ignorecase true
  • 问题链接已失效,看来你可以找到它here
猜你喜欢
  • 1970-01-01
  • 2015-03-01
  • 1970-01-01
  • 2023-03-14
  • 1970-01-01
  • 2012-03-01
  • 2018-12-14
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多