简体   繁体   English

该文件不受版本控制

[英]The file is not under version control

I'm using a Git. 我正在使用Git。 When I add a file and check "Copy items into destination group's folder (if needed)" this error occurs: 当我添加文件并选中“将项目复制到目标组的文件夹(如果需要)”时,会出现以下错误:

在此输入图像描述

Try adding it to your project folder and then drag-and-drop to the project in Xcode. 尝试将其添加到项目文件夹,然后拖放到Xcode中的项目。

If it still doesn't work you can just create a new file in the project itself, call it the same as the file you are trying to copy and then copy-paste all the code. 如果它仍然不起作用,您可以在项目本身中创建一个新文件,将其称为与您尝试复制的文件相同,然后复制粘贴所有代码。

Hope it helps 希望能帮助到你

Just delete the file reference from the XCode. 只需从XCode中删除文件引用即可。 Make sure not move file to trash. 确保不要将文件移动到垃圾箱。 Then add the file again by drag and drop or by Add file to project option. 然后通过拖放或通过“将文件添加到项目”选项再次添加文件。 Now the file will be under source control. 现在该文件将受源代码管理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM