用于大型资源的 Git 子树或 Git Sub 模块?
问题是:我有很多代码,包括 GUI 的插图,我需要对其进行版本控制,以便忠实地重新创建软件产品。我也在 Windows 和 Mac 上工作。我正在编写的每天都会发生变化的实际代码非常小。然而,在构建之前,所有相关资源总计约为几GB。
根据我的在线研究,我似乎需要使用 git-subtree 或 git-submodule 来保持 git 存储库的快速运行。
我确信很多 git 用户都面临着类似的问题,并且面临着同样的决定。
您使用了哪种方法以及您遇到了哪些问题?
Here is the problem: I have a lot of code, including artwork for the GUI I need to version in order to faithfully recreate a software product. I am also working on both Windows and Mac. The actual code I'm working on that will change on a daily basis is really small. However, all the related resources total to about a few GB before its built.
From my research online, it seems like either git-subtree or git-submodule is what I would need to use to keep my git repository fast.
I'm sure a lot of you git users out there faced a similar problem and have been confronted with the same decision.
Which approach have you used and what problems have you faced down the line?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
一个单一的 git 存储库就可以很好地工作。不会更改的大型资源在克隆时只会复制一次。
如果您碰巧拥有随时间变化的大型资源,您可能会发现 git-media 很有用。
A single monolithic git repository will work just fine. Large resources that don't change will only be copied once when you clone.
If you happen to have any large resources that change over time, you might find git-media useful.
我在本地 git-repo 中的服务器上跟踪了千兆字节的二进制文件,这些二进制文件变化不大(在我的例子中是图像),实际上我从未克隆过该服务器。
“代码”直接通过网络使用它。在构建/测试期间,当然还有生产期间。
GigaBytes of binaries which are not changing a lot (images in my case) I tracked on a server in a local git-repo which I never cloned, practically.
The 'code' was using it directly via network. During build/tests and of course production.