Git不会添加或删除对我的文件的更改

时间:2018-09-10 15:33:58

标签: git

当我运行git status时,它表明有一些修改过的文件:

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:   DeviceCloud/6 - Misc/DeviceAlarmProto/DeviceAlarmProto.csproj
        modified:   DeviceCloud/6 - Misc/DeviceAlarmProto/packages.config
        modified:   DeviceCloud/6 - Misc/PlayspaceProto/PlayspaceProto.csproj
        modified:   DeviceCloud/6 - Misc/PlayspaceProto/packages.config
        modified:   DeviceCloud/6 - Misc/ReportProto1/ReportProto1.csproj
        modified:   DeviceCloud/6 - Misc/ReportProto1/packages.config
        modified:   DeviceCloud/6 - Misc/ReportProto4/ReportProto4.csproj
        modified:   DeviceCloud/6 - Misc/TopicSender/TopicSender.csproj
        modified:   DeviceCloud/6 - Misc/TopicSender/packages.config

但是,如果我尝试运行git add .,则不会暂存它们;如果我尝试运行git checkout -- .,则不会删除它们。他们总是在那里。

如果我运行git diff,它将显示对文件的实际更改。例如:

diff --git a/DeviceCloud/6 - Misc/DeviceAlarmProto/DeviceAlarmProto.csproj b/DeviceCloud/6 - Misc/DeviceAlarmProto/DeviceAlarmProto.csproj
index 2d48505..57b1df3 100644
--- a/DeviceCloud/6 - Misc/DeviceAlarmProto/DeviceAlarmProto.csproj
+++ b/DeviceCloud/6 - Misc/DeviceAlarmProto/DeviceAlarmProto.csproj
@@ -45,8 +45,8 @@
     <Reference Include="MasterNLogger">
       <HintPath>..\..\0 - Core\DeviceCloud.Core.Lib\MasterNLogger.dll</HintPath>
     </Reference>
-    <Reference Include="Moq">
-      <HintPath>..\..\packages\Moq.4.8.2\lib\net45\Moq.dll</HintPath>
+    <Reference Include="Moq, Version=4.2.1507.118, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\Moq.4.2.1507.0118\lib\net40\Moq.dll</HintPath>
     </Reference>
     <Reference Include="MQTTnet">
       <HintPath>..\..\packages\MQTTnet.2.7.4\lib\net461\MQTTnet.dll</HintPath>

为什么我不能添加或删除这些更改?我认为这可能与某人(临时)更改“ 6-Misc”文件夹的大小写有关,但是现在又回到了原来的情况。有什么作用?

0 个答案:

没有答案