在没有 git lfs 的情况下推送大文件
Push large file without git lfs
我尝试在 github 提交对我的项目的更改。我已经将 Realm 数据库添加到我的项目中,现在提交太大了。我读到我需要使用 github 大文件,但为此我需要在我的 mac 上安装自制软件。问题是我没有足够的内存来做这个。
我在 github 上找到一篇文章,其中人们建议通过 Xcode swift 包管理器安装 Realm(现在我使用 cocoa pods)并且那么它不应该那么大。但我想知道在一个项目中使用 cocoa pods(我需要它做一些其他事情)和 swift 包管理器是否有问题?
当我尝试提交时,我收到此警报
Pods/Realm/core/realm-monorepo.xcframework/watchos-armv7k_arm64_32/librealm-monorepo.a is 76.01 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
Pods/Realm/core/realm-monorepo.xcframework/ios-arm64_x86_64_i386-simulator/librealm-monorepo.a is 68.40 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
Pods/Realm/core/realm-monorepo.xcframework/tvos-arm64_x86_64-simulator/librealm-monorepo.a is 53.93 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
Pods/Realm/core/realm-monorepo.xcframework/ios-armv7_arm64/librealm-monorepo.a is 77.82 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
首先,自制程序并没有大到您可能 运行 存储空间不足 space(我假设您指的是存储空间,而不是内存)。
另外,您可以选择只提交某些文件。你可以参考这个答案 - Git: How to ignore certain files in Git.
最后,同时使用 Cocoapods 和 Swift Package Manager 应该没有任何问题。我有多个项目都是这样做的,完全没有遇到任何问题。
我尝试在 github 提交对我的项目的更改。我已经将 Realm 数据库添加到我的项目中,现在提交太大了。我读到我需要使用 github 大文件,但为此我需要在我的 mac 上安装自制软件。问题是我没有足够的内存来做这个。
我在 github 上找到一篇文章,其中人们建议通过 Xcode swift 包管理器安装 Realm(现在我使用 cocoa pods)并且那么它不应该那么大。但我想知道在一个项目中使用 cocoa pods(我需要它做一些其他事情)和 swift 包管理器是否有问题?
当我尝试提交时,我收到此警报
Pods/Realm/core/realm-monorepo.xcframework/watchos-armv7k_arm64_32/librealm-monorepo.a is 76.01 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
Pods/Realm/core/realm-monorepo.xcframework/ios-arm64_x86_64_i386-simulator/librealm-monorepo.a is 68.40 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
Pods/Realm/core/realm-monorepo.xcframework/tvos-arm64_x86_64-simulator/librealm-monorepo.a is 53.93 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
Pods/Realm/core/realm-monorepo.xcframework/ios-armv7_arm64/librealm-monorepo.a is 77.82 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
首先,自制程序并没有大到您可能 运行 存储空间不足 space(我假设您指的是存储空间,而不是内存)。
另外,您可以选择只提交某些文件。你可以参考这个答案 - Git: How to ignore certain files in Git.
最后,同时使用 Cocoapods 和 Swift Package Manager 应该没有任何问题。我有多个项目都是这样做的,完全没有遇到任何问题。