[英]Git marks files as changed, can not check out or revert
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
(导致被隐藏的文件,但是“更改”在本地仍然存在) input
, false
和true
core.autocrlf
,在全局和本地,以及来自上方的所有命令 “起作用”的唯一事情是犯下了这些明显的“修改”。 但是我是从另一个分支进行的,现在我无法合并到master,因为这些“更改”仍然存在,并且告诉我在合并之前提交或存储更改。
使用git version 2.7.4.windows.1
相信问题出在你头上。
尝试运行git checkout -b newbranch
然后执行git stash
还有机会运行Cinema 4D,这会阻止git删除文件吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.