git Status显示两次相同的文件

编程入门 行业动态 更新时间:2024-10-10 01:17:36
本文介绍了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显示两次相同的文件

本文发布于:2023-11-13 11:16:41,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1584213.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:两次   文件   git   Status

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!