问题描述
我给我的Git存储区以某种方式的混乱感很明显.
I have the distinct impression my Git repo is somehow mangled.
这是我正在做的顺序:
-
git clone [远程克隆字符串]
git clone [remote's clone string]
这会创建文件"App/android/AndroidManifest.xml"
This creates, among many others, a file "App/android/AndroidManifest.xml"
git mv App/android/AndroidManifest.xml App/android/AndroidManifestTemplate.xml
git mv App/android/AndroidManifest.xml App/android/AndroidManifestTemplate.xml
这将显示错误消息严重:不在版本控制下,source = App/And ..."
This gives the error message "fatal: not under version control, source=App/And..."
最初,我认为这可能是一个gitignore的事情,但事实并非如此.我尝试了git fsck,它没有任何报告.
Initially I thought this might be a gitignore thing, but that's not it either. I tried git fsck, it doesn't report anything.
关于如何修复它的任何建议?
Any suggestions on how to repair it?
推荐答案
也许确实存在App/android/AndroidManifest.xml
,但情况不同(例如App/android/androidmanifest.xml
,这意味着App/android/AndroidManifest.xml
没有版本化(因此错误消息):
Maybe App/android/AndroidManifest.xml
does exist, but with a diferent case (like App/android/androidmanifest.xml
, which would mean that App/android/AndroidManifest.xml
isn't versioned (hence the error message):
然后用正确的大小写做git mv
就足够了.
Doing the git mv
with the right case should then be enough.
OP 解释:
这篇关于git说“不受版本控制"刚刚签出的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!