GitHub has alternatives, but no replacement

GitHub has alternatives, but no replacement

GitHub 有替代品,但没有取代者

Discussed on Hacker News. Codeberg, a Git code hosting platform, recently took a decision to prohibit projects that mostly consist of generative-AI-written code which has prompted concern and extensive discussion elsewhere. 在 Hacker News 上引发了讨论。Git 代码托管平台 Codeberg 最近决定禁止主要由生成式 AI 编写的代码项目,这在其他地方引起了关注和广泛讨论。

The decision does not surprise me, and I don’t mean that as a criticism. Codeberg has always presented itself as a mission-driven alternative to GitHub, not neutral infrastructure. What interests me is the disappointment in the response. Many people reacted as though one of the few plausible GitHub replacements had ruled them or their projects out. They wanted Codeberg to be a universal alternative, a better GitHub and the obvious place to go when leaving it. 这个决定并不让我感到惊讶,我这么说并非批评。Codeberg 一直将自己定位为以使命为导向的 GitHub 替代品,而非中立的基础设施。让我感兴趣的是人们对此反应出的失望。许多人的反应仿佛是 GitHub 仅有的几个可行替代方案之一将他们或他们的项目拒之门外。他们希望 Codeberg 成为一个通用的替代品,一个更好的 GitHub,以及离开 GitHub 后的首选去处。

To me, that exposes a big gap in the open-source space. There are plenty of places to host a Git repository, but remarkably few places to host an open-source community. GitHub gives projects a shared pool of identities, habits and paths to discovery. None of the alternatives has reproduced that at a similar scale. 对我来说,这暴露了开源领域的一个巨大缺口。托管 Git 仓库的地方有很多,但能够托管开源社区的地方却少得惊人。GitHub 为项目提供了一个共享的身份、习惯和发现路径池。没有任何替代品能在同样的规模上复制这一点。

I don’t think the answer has to be another centralized platform, or that every project should live in one place. But decentralization is not enough on its own. Whatever replaces GitHub still needs a shared social layer: identities contributors already have, conventions they understand and ways to discover projects across the network. 我不认为答案必须是另一个中心化平台,也不认为每个项目都必须寄居于一处。但仅靠去中心化是不够的。无论什么取代 GitHub,它仍然需要一个共享的社交层:贡献者已有的身份、他们理解的惯例,以及在整个网络中发现项目的方式。

Why not self-hosting?

为什么不选择自托管?

Whenever dissatisfaction with GitHub comes up, someone inevitably says: “Git is decentralized. Just self-host a forge.” 每当对 GitHub 的不满出现时,总有人不可避免地说:“Git 是去中心化的。直接自托管一个代码托管平台就行了。”

I’ve self-hosted Gitea for years, so this is an argument I’m very familiar with. Self-hosting works well for personal projects, but I wouldn’t use it for something I wanted strangers to contribute to. On GitHub, most people already have an account and understand how issues and pull requests work. On my forge, even reporting a small bug means creating another account, learning how my forge works and what conventions I want you to follow. Unless someone really cared, they probably wouldn’t bother. I know I wouldn’t. 我已经自托管 Gitea 多年,所以我对这个论点非常熟悉。自托管对于个人项目来说效果很好,但我不会用它来托管我希望陌生人参与贡献的项目。在 GitHub 上,大多数人已经拥有账户,并了解 Issue 和 Pull Request 的工作方式。而在我的托管平台上,即使是报告一个小 Bug,也意味着要创建一个新账户,学习我的平台如何运作,以及我希望你遵循什么惯例。除非某人真的非常在意,否则他们可能不会费这个劲。我知道我自己就不会。

And contribution is only half of it. GitHub used to be genuinely good at discovery. I regularly found projects because someone I followed starred them, often in areas I would never have searched for myself. It felt like a social network built around people making things. 而且贡献只是其中一半。GitHub 曾经在发现项目方面做得非常好。我经常因为关注的人给某个项目加星而发现它,这些项目往往是我自己永远不会去搜索的领域。它感觉就像是一个围绕着创造者建立的社交网络。

GitHub has since redesigned that feed, and I almost never visit it anymore. Defaults are powerful: once discovery stopped being part of the experience GitHub put in front of me, it largely disappeared from my workflow. 后来 GitHub 重新设计了那个动态流,我几乎再也不去看了。默认设置的力量是强大的:一旦“发现”不再是 GitHub 呈现给我的体验的一部分,它就在很大程度上从我的工作流中消失了。

Why not GitHub?

为什么不选择 GitHub?

The basic experience of GitHub has been getting steadily worse. It is slow, things regularly fail to load and notifications are unreliable. GitHub itself recently described two major incidents as “not acceptable”. GitHub 的基础体验一直在稳步恶化。它速度缓慢,经常无法加载内容,通知也不可靠。GitHub 自己最近也将两次重大事故描述为“不可接受”。

Its pull request experience has been awful too. Large PRs are painfully slow to navigate and review. Stacked PRs have been common inside large software companies for well over a decade, but only just became a thing with GitHub and, even then, seems to be quite buggy. 它的 Pull Request 体验也很糟糕。大型 PR 的导航和审查速度慢得令人痛苦。堆叠式 PR(Stacked PRs)在大型软件公司内部已经流行了十多年,但在 GitHub 上才刚刚出现,而且即便如此,似乎也相当不稳定。

What frustrates me about GitHub’s push towards AI is that the core forge feels neglected while Copilot appears everywhere. An agent writing more code doesn’t help when the interface for reviewing it is already struggling. GitHub 向 AI 的推进让我感到沮丧的是,核心托管功能似乎被忽视了,而 Copilot 却无处不在。当审查代码的界面本身已经很吃力时,一个能写更多代码的代理并不能解决问题。

Ghostty exemplifies this frustration. In late April, Mitchell Hashimoto announced that Ghostty is leaving GitHub because frequent outages were preventing its maintainers from working reliably: Ghostty 就是这种挫败感的典型例子。4 月下旬,Mitchell Hashimoto 宣布 Ghostty 将离开 GitHub,因为频繁的宕机导致其维护者无法可靠地工作:

On the day I am writing this post, I’ve been unable to do any PR review for ~2 hours because there is a GitHub Actions outage. This is no longer a place for serious work if it just blocks you out for hours per day, every day. “在我写这篇文章的当天,我已经有大约 2 小时无法进行任何 PR 审查,因为 GitHub Actions 宕机了。如果它每天都要阻碍你工作几个小时,那这里就不再是一个适合进行严肃工作的地方了。”

Interestingly, he also makes the point that GitHub is more than hosting: 有趣的是,他还指出 GitHub 不仅仅是托管:

To the “Git is distributed!” crowd: the issue isn’t Git, it’s the infrastructure we rely on around it: issues, PRs, Actions, etc. “对于那些高喊‘Git 是分布式的!’的人群:问题不在于 Git,而在于我们围绕它所依赖的基础设施:Issue、PR、Actions 等。”

Hashimoto said Ghostty was in discussions with multiple commercial and FOSS providers and planned an incremental migration. The fact that such a prominent project had to shop around, rather than move to an obvious default, is exactly the gap I mean. Hashimoto 表示 Ghostty 正在与多家商业和开源(FOSS)提供商进行讨论,并计划进行渐进式迁移。这样一个知名的项目不得不四处寻找替代方案,而不是迁移到一个显而易见的默认选项,这正是我所指的那个缺口。

Why not the alternatives?

为什么不选择其他替代品?

It’s worth going through the alternatives and the problems I see with each: 值得审视一下这些替代方案,以及我所看到的每个方案存在的问题:

  • GitLab is capable, but it feels incredibly corporate, even more so than GitHub. Nor have I found it as good as GitHub at helping people stumble across projects and developers. GitLab 功能强大,但感觉非常企业化,甚至比 GitHub 更甚。我也没觉得它在帮助人们偶然发现项目和开发者方面做得像 GitHub 那么好。
  • SourceHut is focused and transparent and, like Codeberg, openly values-driven. Its email-oriented workflow, while battle-tested by projects like the Linux kernel, is unfamiliar to most GitHub users. SourceHut 专注且透明,和 Codeberg 一样,公开以价值观为导向。它以电子邮件为导向的工作流虽然经过了 Linux 内核等项目的实战检验,但对大多数 GitHub 用户来说并不熟悉。
  • Forgejo’s federation project may eventually connect self-hosted instances into a shared network. It looks promising, but has been in development for quite some time, remains experimental and is not yet a practical answer to the social fragmentation of self-hosting. Forgejo 的联邦项目最终可能会将自托管实例连接成一个共享网络。它看起来很有前景,但已经开发了相当长一段时间,目前仍处于实验阶段,对于解决自托管带来的社交碎片化问题,还不是一个实用的答案。
  • Radicle is technologically interesting: repositories are replicated peer to peer, while issues and patches are stored alongside them. But it still feels too immature to replace GitHub for a public project. For example, its public web interface lets people browse repositories, but contributing requires them to install its CLI or desktop application. Someone encountering a bug should not have to install the forge’s software merely to report it. Radicle 在技术上很有趣:仓库通过点对点方式复制,而 Issue 和补丁则存储在仓库旁边。但它对于取代 GitHub 上的公共项目来说还显得太不成熟。例如,它的公共 Web 界面允许人们浏览仓库,但贡献代码需要安装其 CLI 或桌面应用程序。遇到 Bug 的人本不应该仅仅为了报告它而必须安装该平台的软件。
  • The project I’m most interested in is Tangled, based mostly on gut feel. I like its focus on the social experience around code. For example, its home page immediately shows me a bunch of cool projects, exactly like old GitHub used to do. But it is still in alpha, and it remains to be seen whether it can blossom into a true alternative. 我最感兴趣的项目是 Tangled,这主要基于直觉。我喜欢它对围绕代码的社交体验的关注。例如,它的主页立即向我展示了一堆很酷的项目,就像老版 GitHub 曾经做的那样。但它仍处于 Alpha 阶段,能否成长为一个真正的替代品还有待观察。

Could a boring company fill the gap?

一家“无聊”的公司能填补这个空白吗?

One thing that stands out is that, apart from GitLab, every competitor is built around either decentralization or a social mission. That makes each of them fundamentally less “straightforward” than a for-profit company. It makes me wonder whether there is room for one. 有一点很突出:除了 GitLab,每个竞争对手都是围绕去中心化或某种社会使命构建的。这使得它们每一个在本质上都比营利性公司显得不那么“直接”。这让我怀疑是否还有一家公司的生存空间。

Perhaps it could look more like bunny.net than a venture-backed startup: a deliberately boring company. 也许它看起来更像 bunny.net 而不是一家风险投资支持的初创公司:一家刻意保持“无聊”的公司。