让 Xcode 4 服从 .gitignore

发布于 2024-11-08 23:04:46 字数 697 浏览 0 评论 0原文

我已经成功克隆了 git hub 存储库。该存储库的文件夹结构如下:

root-repository-folder->iOS

因此,我已将 Xcode 4 项目文件夹移动到上述文件夹中,因此文件夹结构如下所示: root-repository-folder->iOS iOS->project

我已经成功地按照 http://www.mindthe.net/devices/2011/04/28/12-steps-to-using-github-with-xcode-4/" mindthe.net/devices/2011/04/28/12-steps-to-using-github-with-xcode-4/

到目前为止一切顺利,但现在当我想再次提交并推送 Xcode 时4 告诉我,我有关于 xcuserdata 的未提交的更改。所以我在项目目录中添加了一个 .gitignore 文件来忽略 xcuserdata。但 Xcode 4 似乎不遵守 .gitignore 文件。所以我被困在这里,我做错了什么?

干杯,

彼得

I've cloned a git hub repository successfully. The folder structure of that repository is as following:

root-repository-folder->iOS

So I've moved my Xcode 4 project folder into the above folder so the folder structure looks like this then: root-repository-folder->iOS->project

I've successfully managed to commit and push my project folder to the Git Hub repository from Xcode 4 by following the guide at http://www.mindthe.net/devices/2011/04/28/12-steps-to-using-github-with-xcode-4/

So far so good, but now when I want to make another commit and push Xcode 4 tells me that I have uncommited changes referring to xcuserdata. So I add a .gitignore file to the project directory to ignore xcuserdata. But Xcode 4 doesn't seem to obey the .gitignore file. So I'm stuck here, what am I doing wrong?

Cheers,

Peter

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

℡Ms空城旧梦 2024-11-15 23:04:46

我想请你参考这里: Git 忽略 Xcode 项目的文件

似乎适合那些使用 Xcode4 的人。确保 .gitignore 中有正确的条目。从命令行验证一次以查看文件是否确实被忽略。

此外,任何已提交的文件都不能被忽略。因此,如果您已经提交了它,rm 它然后忽略应该可以。

I would ask you to refer here: Git ignore file for Xcode projects

Seems to work for those using Xcode4. Make sure you have the correct entries in the .gitignore. Verify from command line once to see if the files are actually being ignored.

Also, any file that is already committed cannot be ignored. So if you had already committed it, rm it and then ignore should work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文