简体   繁体   English

Xcode推送.xcodeproj文件

[英]Xcode pushes the .xcodeproj file

I created a Xcode project and pushed it into my GitHub repo(new).我创建了一个 Xcode 项目并将其推送到我的 GitHub 存储库(新)中。 However, it sends not only my code files, but also the.xcodeproj file.但是,它不仅发送我的代码文件,还发送 .xcodeproj 文件。 How to push only the folders and files I need?如何只推送我需要的文件夹和文件?

I tried to create the.gitignore file manually, and then push the project using Xcode, but it still pushed the.xcodeproj file.我尝试手动创建.gitignore 文件,然后使用Xcode 推送项目,但它仍然推送了.xcodeproj 文件。

You would need to record the deletion of that file locally, and push said deletion:您需要在本地记录该文件的删除,并推送所述删除:

git rm --cached --  .xcodeproj 
git commit -m "delete .xcodeproj"
git push

Then:然后:

  • that file would be ignored: check that with git check-ignore -v --.xcodeproj该文件将被忽略:使用git check-ignore -v --.xcodeproj
  • that file would no longer be pushed, or visible on the remote side该文件将不再被推送或在远程端可见

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

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