简体   繁体   English

Git和XCode:合并.xcodeproj会发出二进制警告

[英]Git and XCode: Merging .xcodeproj gives binary warning

I am working with branches and wanting to merge with my master, but the files inside of my .xcodeproj are causing huge issues. 我正在与分支机构合作,并希望与我的母版合并,但是.xcodeproj中的文件导致了很多问题。

Constantly getting errors about overriding them, that they are binary files, etc etc. 不断出现有关覆盖它们的错误,它们是二进制文件,等等。

What do I need to do to never have to worry about this? 我需要做什么以不必担心这个? It is driving me nuts! 它让我发疯!

NOTE: I have a .gitignore file in my master that ignores these files, but not in my branch. 注意:我的母版中有一个.gitignore文件,它会忽略这些文件,但在我的分支中却没有。 Not sure what to do about that. 不知道该怎么办。

In the root of the project (eg, same directory as .git ), add a git ignore file 在项目的根目录(例如,与.git相同的目录)中,添加一个git ignore文件

.gitignore

With a line that says 一行写着

.xcodeproj

Then remove the .xcodeproj file from the repo... 然后从存储库中删除.xcodeproj文件...

git rm --cached /path/to/.xcodeproj

Then add the .gitignore file 然后添加.gitignore文件

git add .gitignore

Then commit 然后提交

git commit -m "Removed .xcodeproj; added ignore pattern to excluded it"

您可以使用.gitignore文件来指定git忽略的文件。

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

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