什么是jj,为什么我应该关心?
jj – the CLI for Jujutsu

原始链接: https://steveklabnik.github.io/jujutsu-tutorial/introduction/what-is-jj-and-why-should-i-care.html

## 柔术 (jj):下一代版本控制系统 柔术 (jj) 是一种新的分布式版本控制系统,旨在改进像 Git 这样的现有工具。尽管听起来雄心勃勃,jj 声称它**既比 Git 更简单*又*更强大**——这种罕见的结合是通过综合 Git 和 Mercurial 的最佳特性来实现的。 它通过更小但更具凝聚力和强大核心工具来实现这一点。高级用法可以解锁在 Git 中难以实现的功能。 一个关键优势是**与 Git 的兼容性**。您可以在本地使用 jj,而无需强制协作者切换,从而提供了一种无风险的方式来探索潜在的更优工作流程。如果 jj 不适合您的需求,可以无缝地恢复到 Git,而不会丢失历史记录。本质上,jj 为 Git 用户提供了一个引人注目的替代方案,并且没有真正的缺点。

## jj:一种新的版本控制方法 最近的 Hacker News 讨论集中在 **jj** 上,这是一种旨在改进 Git 的新型版本控制系统。虽然 Git 仍然强大,但 jj 提供了不同的方法,尤其避免了索引,并且默认自动提交编辑,除非明确阻止。 用户们争论 jj 的工作流程。有些人不喜欢自动提交,认为需要额外的步骤来保留历史记录,而另一些人则欣赏使用 `new` 和 `squash` 命令的简洁性。一个突出的挑战是与 GitHub 的代码审查集成,在 GitHub 上跟踪跨版本更改可能很困难。 尽管存在这些担忧,jj 仍然与 Git 兼容,允许用户在无需强制团队全面采用的情况下尝试它。 讨论还涉及对改进版本控制的更广泛需求,质疑是否需要彻底的重构,或者是否可以改进现有解决方案。最终,jj 提供了一种一些人认为很有前景的替代方案,尤其是在与 AI 代理一起使用时,其架构具有良好的恢复能力。
相关文章

原文

jj is the name of the CLI for Jujutsu. Jujutsu is a DVCS, or "distributed version control system." You may be familiar with other DVCSes, such as git, and this tutorial assumes you're coming to jj from git.

So why should you care about jj? Well, it has a property that's pretty rare in the world of programming: it is both simpler and easier than git, but at the same time, it is more powerful. This is a pretty huge claim! We're often taught, correctly, that there exist tradeoffs when we make choices. And "powerful but complex" is a very common tradeoff. That power has been worth it, and so people flocked to git over its predecessors.

What jj manages to do is create a DVCS that takes the best of git, the best of Mercurial (hg), and synthesize that into something new, yet strangely familiar. In doing so, it's managed to have a smaller number of essential tools, but also make them more powerful, because they work together in a cleaner way. Furthermore, more advanced jj usage can give you additional powerful tools in your VCS sandbox that are very difficult with git.

I know that sounds like a huge claim, but I believe that the rest of this tutorial will show you why.

There's one other reason you should be interested in giving jj a try: it has a git compatible backend, and so you can use jj on your own, without requiring anyone else you're working with to convert too. This means that there's no real downside to giving it a shot; if it's not for you, you're not giving up all of the history you wrote with it, and can go right back to git with no issues.

联系我们 contact @ memedata.com