git Status显示两次相同的文件-但路径斜杠样式不同 [英] git Status Shows Same File Twice - But with different path slash styles

查看:350
本文介绍了git Status显示两次相同的文件-但路径斜杠样式不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我执行git status时,看到的更改列表如下所示:

When I do a git status, I see a change list that looks like this:

#       modified:   CustomizablePDFs/InvoiceAdapter.php
#       deleted:    "CustomizablePDFs\\Model/AlignContainer.php"

如果我add然后commit CustomizablePDFs/InvoiceAdapter.php,它将被提交(应该如此),并且不再出现在状态列表中(良好).

If I add then commit CustomizablePDFs/InvoiceAdapter.php, it will be commited (as it should be) and no longer appear in the status list (good).

但是,git status仍会在状态列表上显示deleted: "CustomizablePDFs\\Model/AlignContainer.php".如果我使用该文件路径进行git rm操作,则无法显示pathspec与任何文件都不匹配.

However, git status will still show deleted: "CustomizablePDFs\\Model/AlignContainer.php" on the status list. If I do a git rm using that file path, it fails saying that the pathspec did not match any files.

如何从状态列表中删除该条目?

How do I remove this entry from the status list?

谢谢你,

推荐答案

git add -A然后执行提交即可解决此问题.

git add -A followed by a commit fixed the problem.

这篇关于git Status显示两次相同的文件-但路径斜杠样式不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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