对象存储变 Git 后端
推荐指数 62.0 NO. 014 · 2026.06.25
发布2026/06/24Score54Comments11
为什么值得看
作者用 billy 文件系统抽象层让 Tigris 对象存储 bucket 充当 Git 服务端,实现纯 Go 的 git 协议处理。这对想自建 Git 托管又不想维护完整文件系统的团队有参考价值。
编辑判断
大多数自托管 Git 的方案要么用 GitLab/Gitea 这种重量级平台,要么直接用裸仓库加 SSH,对象存储当后端一直是空白地带。这个项目的关键洞察是 billy 接口恰好覆盖了 git 操作所需的文件语义,不需要自己造轮子。
但有个明显限制:go-git 不支持部分高级特性如 git LFS 和某些 hooks,生产环境用之前要扫一遍你的团队是否依赖这些。如果你在搞 Serverless Git 托管或者想把代码仓库和 CI 产物存到同一套存储里,这个思路值得 fork 下去改。
社区反馈
正面 11 条评论
核心争论:Git 后端是否必须依赖 POSIX 文件系统,对象存储能否更原生适配
相关内容
告别仓库臃肿:Git LFS冷数据自动迁移全指南 Git LFS自定义传输代理机制允许将对象数据迁移到S3、OSS等对象存储后端,实现冷数据无缝转移。 Git LFS 的反思 - 江二十三的思考 开发LFSOSS支持多种对象存储后端,只需修改URL生成即可切换不同云存储。 Git对象存储与GitHub仓库快照架构对比解析 Git核心创新在于不可变对象存储模型,通过SHA-1哈希值引用形成版本图谱。 Git Under the Hood, Part 1: Object Storage in Git Git四种对象类型:blob、tree、commit、tag,blob存储文件内容但不包含模式信息。
Came here for a five-gallon bucket hooked to Dulwich (archiving rain?), Slightly disappointed :) Go Git and Dulwich and friends are indeed fun tech.
Most of the pain here is the typical set of issues people run into trying to make S3 a filesystem as-is, common with S3FS-family approaches. ZeroFS (https://github.com/Barre/zerofs) is 9P/NFS/NBD over S3 on an LSM. Point stock go-git, or just /usr/bin/git
Author of the article here. I'm aware of ZeroFS and other similar approaches (such as something internal at Tigris that will become public at a later date), this was more of an experiment to see how far you can get with stuff I already had "on the shelf". I am going to be improving this a fair bit;