0

I pushed my code to repository, I can see the MyProject.xcdatamodel/contents file in bitbucket along with other files. But when pulling the repository, all files are added except the coredata file MyProject.xcdatamodel/contents. Am I versioning the right coredata files? Thanx.

EDIT:

here is my gitignore file:

.DS_Store
*.swp
*.lock
profile
DerivedData/
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
#    NB: also, whitelist the default ones, some projects need to use these
!default.pbxuser
!default.mode1v3
!default.mode2v3
!default.perspectivev3
*.xcuserdata
!xcshareddata
!xcschemes
*.moved-aside
*.xcodeproj
.xcworkspace
4

2 回答 2

0

作为标准,我将忽略文件设置为:

xcuserdata
project.xcworkspace
.DS_Store

并根据需要从那里添加。

不确定为什么要添加*.xcodeproj到忽略文件中。这是项目信息的主要存储库。每当您在项目中添加文件(如添加模型版本)时,您都希望将更改记录在项目中......

您可以忽略 xcodeproj 文件(它实际上是一个文件夹)中的某些内容,但您不应该忽略整个内容。

于 2013-06-05T19:02:58.270 回答
0

忽略文件

有时,您不希望 git 跟踪某些文件。有几种方法可以告诉 git 忽略哪些文件。

如果您在存储库中创建一个名为.gitignoregit 的文件,则在查看要提交的文件时将使用其规则。请注意,在将规则添加到此文件以忽略它之前,git 不会忽略已经跟踪的文件。在这种情况下,必须取消跟踪文件,通常使用 gitrm --cached filename

该文件可以提交到存储库中,从而与克隆存储库的任何其他用户共享规则列表。

请注意,您可以.gitignore在任何子路径中创建一个以将其规则应用于该路径。有时空.gitignore file的用作空路径的占位符,例如强制 git 生成一个 log/ 路径供您的开发环境使用。

示例.gitignore文件

*.exe
*.dcu
*.dres
*.local
*.identcache
__history/*
Win32/*
Win64/*
于 2013-06-05T06:42:08.697 回答