如何在 gitignore 中添加 project.pbxproj



每次尝试从 gitlab 拉取或合并时,我都会遇到合并冲突。 如何处理这些类型的文件?

我不建议你将project.pbxproj文件添加到.gitignore。它是 Xcode 配置捆绑包中的重要文件。它负责维护对所有链接文件及其分组、链接框架和项目生成设置的引用。

有关详细信息,请查看本文。

但是,如果要将来忽略此文件,

  1. 提交所有更改
  2. git rm --cached /App/App.xcodeproj/project.pbxproj
  3. 将/App
  4. /App.xcodeproj/project.pbxproj(或类似)添加到 .gitignore
  5. 再次提交

project.pbxproj 文件仅在我提供的 git 和 .gitignore 文件中首次上传以替换您的 .gitignore 文件......

# OSX
#
.DS_Store
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
# node.js
#
*.hprof
node_modules/
npm-debug.log
yarn-error.log
yarn.lock
# BUCK
buck-out/
.buckd/
*.keystore
!debug.keystore
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/
*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots
# Bundle artifact
*.jsbundle
# CocoaPods
/ios/Pods/

最新更新