Best practices for using version-controlling on Cocoa projects

。_饼干妹妹 提交于 2019-12-20 09:45:35

问题


I recently started using Git as my version control system for some Cocoa projects I'm working on and wondered if there are best practices for working with version control systems on Cocoa projects.

There is the obvious "build" directory which I exclude from versioning as it's not important and can change quite a bit when debugging some code and then there are those .pbxuser and .perspectivev3 which change ever time I open the project in Xcode but I don't really know if they are "important" enough to be checked in.

Is there a commonly used configuration for excluding unimportant files?

Thanks in advance


回答1:


Here's my Mercurial .hgignore file, which is based on Peter Hosey's.

syntax: glob

.DS_Store

*.swp
*~.nib

build

*.pbxuser
*.perspective
*.perspectivev3
*.mode1v3

*.pyc



回答2:


I never commit the ${LOGNAME}.* files as they're basically preferences information for the current user; the project sources, targets, dependencies and so on are in the project.pbxproj file. And as you mentioned in your question, the build directory (assuming you have the Place Build Products in: Project directory option set) is where the derived files live, so there's no need to check that in. You can always re-generate its contents from the source code.



来源:https://stackoverflow.com/questions/236151/best-practices-for-using-version-controlling-on-cocoa-projects

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!