Git将文件标记为已更改,无法签出或还原

时间:2016-06-10 16:19:26

标签: windows git

Git现在完全吓坏了我。我完全无法删除这些修改:

On branch master
Your branch is up-to-date with 'origin/master'.
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:   Exchange Plugins/VWSDK/SDKVW(234280)/Source/Samples/Stage 2/old resource/AOE_EN.r
        modified:   Exchange Plugins/VWSDK/SDKVW(234280)/Source/Samples/Stage 2/old resource/AOE_NL.r
        modified:   Exchange Plugins/VWSDK/SDKVW(234280)/Source/Samples/Stage 2/old resource/Afvoerleiding_NL.r
        modified:   Exchange Plugins/VWSDK/SDKVW(234280)/Source/Samples/Stage 2/old resource/EditLicense_NL.r
        modified:   Exchange Plugins/VWSDK/SDKVW(234280)/Source/Samples/Stage 2/old resource/Guideline_NL.r
        modified:   Exchange Plugins/VWSDK/SDKVW(234280)/Source/Samples/Stage 2/old resource/Leiding3D_NL.r
        modified:   Exchange Plugins/VWSDK/SDKVW(234280)/Source/Samples/Stage 2/old resource/RV_NL.r
        modified:   Exchange Plugins/VWSDK/SDKVW(234280)/Source/Samples/Stage 2/old resource/Radiator_NL.r
        modified:   Exchange Plugins/VWSDK/SDKVW(234280)/Source/Samples/Stage 2/old resource/ReplaceSymbol_EN.r
        modified:   Exchange Plugins/VWSDK/SDKVW(234280)/Source/Samples/Stage 2/old resource/ReplaceSymbol_NL.r

no changes added to commit (use "git add" and/or "git commit -a")

但是我从来没有改变过这些文件,也没有别的。它们来自某些SDK,无论如何都不应该被触及。使用git diff -R表明它似乎是一些行结尾问题:

λ git diff -R
diff --git b/Exchange Plugins/VWSDK/SDKVW(234280)/Source/Samples/Stage 2/old resource/AOE_EN.r a/Exchange Plugins/VWSDK/SDKVW(234280)/Source/Samples/Stage 2/old resource/AOE_EN.r
index ef6bf97..e7cb032 100755
--- b/Exchange Plugins/VWSDK/SDKVW(234280)/Source/Samples/Stage 2/old resource/AOE_EN.r
+++ a/Exchange Plugins/VWSDK/SDKVW(234280)/Source/Samples/Stage 2/old resource/AOE_EN.r
@@ -1,27 +1,27 @@
-#ifndef REZ_FOR_MACHO
-       #define REZ_FOR_MACHO 0
-#endif
-
-#if REZ_FOR_MACHO
-       #include <Carbon/Carbon.r>
-#else
-       #include "MacTypes.r"
-#endif
-
-#include "GSRsrc.r"
-
-// ------------------------------------------------------------------------------------------------------------
-// The parametric object resources
-resource 'STR#' (18200, "CExtObj")  {
-       {
-        /* 1 */                "Organisation - Objects",
-        /* 2 */                "Organisation - Objects",
-        /* 3 */                "HVACS",
-        /* 4 */                "Extension Tool : Do something",
-       }
-};
-
-resource 'TEXT' (18200, "CExtObjAdvComplex:help") {
-       "some help\n\n"
-       "Create a radiator."
-};
+#ifndef REZ_FOR_MACHO^M
+       #define REZ_FOR_MACHO 0^M
+#endif^M
+^M
+#if REZ_FOR_MACHO^M
+       #include <Carbon/Carbon.r>^M
+#else^M
+       #include "MacTypes.r"^M
+#endif^M
+^M
+#include "GSRsrc.r"^M
+^M
+// ------------------------------------------------------------------------------------------------------------^M
+// The parametric object resources^M
+resource 'STR#' (18200, "CExtObj")  {^M
+       {^M

我尝试过的事情:

  • git reset --hard
  • git checkout .
  • git stash(导致文件被隐藏,但&#34;更改&#34;仍然存在于本地)
  • {li> core.autocrlf inputfalsetrue,全局和本地以及上面的所有命令

&#34;唯一能做的事情&#34;正在进行这些明显的修改&#34;。但是我从另一个分支机构做了这个,现在我无法合并到主服务器中,因为这些&#34;更改&#34;仍然存在,它告诉我在合并之前提交或存储更改。

使用git version 2.7.4.windows.1

1 个答案:

答案 0 :(得分:0)

我相信问题是你已经脱离了头脑。

尝试运行viewWillAppear(),然后git checkout -b newbranch

也有可能你有电影4D运行,这是阻止git删除文件?