我是 Xcode 的新手,刚刚发现它在项目目录中存储了一堆用户信息和其他内容,我在版本控制中并不真正需要这些信息,也不想将它们放在 Github 上。 Xcode 项目基本上是这样的:
1 AppName/
2 ├── AppName
3 │ ├── Base.lproj
4 │ │ ├── LaunchScreen.xib
5 │ │ └── Main.storyboard
6 │ ├── Images.xcassets
7 │ │ └── AppIcon.appiconset
8 │ │ └── Contents.json
9 │ ├── AppDelegate.swift
10 │ ├── Info.plist
11 │ └── ViewController.swift
12 ├── AppName.xcodeproj
13 │ ├── project.xcworkspace
14 │ │ ├── xcuserdata
15 │ │ │ └── user1.xcuserdatad
16 │ │ │ └── UserInterfaceState.xcuserstate
17 │ │ └── contents.xcworkspacedata
18 │ ├── xcuserdata
19 │ │ └── user1.xcuserdatad
20 │ │ └── xcschemes
21 │ │ ├── AppName.xcscheme
22 │ │ └── xcschememanagement.plist
23 │ └── project.pbxproj
24 └── AppNameTests
25 ├── AppNameTests.swift
26 └── Info.plist
我倾向于只提交 AppName/
和 AppNameTests/
并排除 AppName.xcodeproj/
目录。推荐的做法是什么?
最佳答案
您需要使用 .gitignore
文件来指定您不想将哪些文件存储在 GitHub 中。
Here is how to create the file , 和 here's what should go in that .gitignore
file .
关于xcode - 我应该在版本控制中存储 Xcode 项目的哪些文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31890665/