by xnorswap · 10mo ago · 0 comments
Git: Used by everyone else
Fossil: Not used by everyone else
Everything else is kind of irrelevant. Git is hard to use and awkward to master, but you need to do so anyone to work with everyone else.I wish it wasn't the case, but network effects are really important. Mercurial was a better DVCS launched around the same time as git but it lost out, not because "worse is better" but the network effects spreading out from the of the linux kernel itself.
It is not just because the CLI is more intuitive, though it plays a big part.
The main reason is that mercurial is more opinionated. On a default setup, only a few commands are available, and none of them let you change the history. If you want more, you have to add an extension. These are built-in, that's just a line in a configuration file, so that's not much of an obstacle, but you have to be deliberate. It gives a natural progression, and it better defines the project organization.
With git, you have everything and the kitchen sink, literally, as it uses the "plumbing" and "porcelain" metaphor. All flavors of merge, rebase and fast forward are available, there is a git-reset command that does a dozen of different things, there is stash, the staging area, etc... The first month or two on git, I was a bit overwhelmed, none of that with Mercurial, and I already had the experience of Mercurial when I switched to git, so I was familiar with the concept of push/pull and DAGs.
Now, I tend to prefer git, though after many years, I still have trouble wrapping my head around the command line sometimes. But that's for the same reason it was so hard to me to get into it. It gives out a lot of freedom and possibilities. For example, I like the fact it is really decentralized, for example in one project the customer had a completely separate central repository we couldn't access, and they couldn't access ours, for security reasons. We worked by exchanging bundle files. At some point we also took advantage of the fact that it is possible to have more than one root commit. Also, almost all mistakes are fixable and it is hard to really lose anything (including secrets, so beware!).
For a video game analogy, Mercurial introduces you to new game mechanics as you progress, while Git makes you start in the middle of the map with all the skills unlocked.
More add-on discussion including Microsoft+Git spurred by your previous comment about this: https://news.ycombinator.com/item?id=15725497
From the Facebook blog post, it seems like the key issue was Facebook's internal filesystem monitoring tool (Watchman) was easier to integrate with Mercurial than with Git:
https://engineering.fb.com/2014/01/07/core-infra/scaling-mer...
So, neither Mercurial-out-of-the-box nor Git-out-of-the-box could handle huge monorepos. But Mercurial's willingness to make some modifications made it easier for Facebook to integrated their custom tooling to avoid the slow Big-O O(n) scans for changed files.
> https://engineering.fb.com/2014/01/07/core-infra/scaling-mer...
That link is from 2014, is there any more recent work to make Git use a file watcher rather than scan the whole tree?
Fossil is used for one of the most deployed embeddable database. Not sure we can call it "irrelevant".
I get what your message is saying, however words have meaning, and being hyperbolic does not help anyone when we try to bring nuances.
> Mercurial was a better DVCS [...]
Totally agree.
In other words: its use of any specific VCS is pretty much irrelevant.
A life non-goal for me is becoming proficient in a version control system and Git, insofar as I've been able to tell, demands that you become proficient in an uncomfortably large subset of its features in order to get through any workload, even in the simplest realistic cases.
jj did take some getting use to, but after a couple days it was all sorted and actions which terrified me in Git felt natural and safe using jj. The kind of things that required me to go back to the git documentation (or stackoverflow, or some blog posts) to be sure I was holding it right... in jj it comes easily and naturally.
That jj offers sufficient power under a simple interface to get through the day ... while being compatible with those that use Git... make it a no-brainer for me.
I have recently returned to Fossil for personal stuff. IMO its better than git for one person projects and small teams. It was designed for a small team. What everyone else uses does not really matter for personal stuff. Nor does it matter if you are working with people willing to try something new. Nor does it matter to someone who can take a decision for a team.
It is also very easy to self host.
Today my workflow is based on git + gerrit code review (which is heavily based around git), or in other areas github pull requests, and there is no such thing as a series of little commits that all hodge-podge together to form a particular change to the code, we tailor changes to be perfect, we push -f to keep each commit in the series to be a full and CI-tested story of a change, then we squash-merge them. My use with git is 100% all day things that were impossible with Mercurial back when I used it, if there are extensions for these things now, they are afterthoughts, git understood these concepts from the beginning.
git allows for folks to be Pinky's out with their commit history for warm an fuzzies.
If you think editing history is a grand idea that should be used regularly (like with rebase) then I already know you likely haven't been responsible for large mature code base. Where you'd rather have every comment, change and scrap of info available to understand what you're trying to maintain because the folks before you are long gone.
Oops, I made a mistake two commits ago, I'd really like to get some dumb print statements I added out before I send this off to get merged is perfectly valid, I just did it yesterday. A quick `git commit --fixup` followed by `git rebase -i --autosquash HEAD^3` and I had some dumb debugging code I left in stripped out.
Then, there's other perfectly valid uses of rebase, like a simple `git rebase main` in an active development branch to reparent my commits on the current HEAD instead of having my log messed up with a dozen merge commits as I try to keep the branch both current and ready to merge.
So, yes, I do think editing history is a grand idea that should be used regularly. It lets me make all the stupid "trying this" and "stupid bug" commits I want, without polluting the global history.
Or, are you telling me you've also never ended up working on two separate tasks in a branch, thinking they would be hard to separate into isolated changes, and they ended up being more discrete than you expected so you could submit them as two separate changes with a little help from `git cherry-pick` and `git rebase` too?
Editing history isn't evil. Editing history such that pulls from your repository break? That's a different story entirely.
Caring more about a "visually pleasing log" when you can care about an information rich log doesn't jive with me. Logs aren't supposed to be "clean"
If I want features in two branches, I make two branches. Cherry pick also is bad for most people, most of the time.
I'm so old that I remember people saying that about Linux, PostgreSQL, and AMD processors ;)
There are plenty of situation in which all that matters is that the people actually building are happy with it and a tool that literally nobody else uses would be fine.
Indeed, for many engineering jobs (software and other) in some industries, it's entirely necessary to create new tools and use extremely specialiased. Good people will learn how to use (and build/improve them).
I'd possibly go as far as arguing that a sign of a good team is willingness to aggressively use the right tool for the job even if it is obscure or something they have to build themselves.
Sure, if you're hoping to get traction with an open source JavaScript library… git and github maybe be pre-requisites, but for projects of a certain sort "reach" and "adoption" by other developers are the most important metric. (Though, SQLite has done just fine with Fossil, so there's probably a degree of overstatement in the idea that it anything has to use git / be on Github.)
Those users wouldn't mind switching to Fossil if the graphical interface is reasonably easy to discover and use.
Yeah. I was using Mercurial and, reluctanctly, had to switch to Git. Now don't get me wrong: I was forced to use both CVS and SVN in a thankfully very distant past so I love Git. But I do miss Mercurial. We switched exactly for the reason you mentioned: Git simply won the market.
Git won, Magit is awesome. Then all the Github and whatnots. It's Git, Git and Git.
And never bet against Linus, either: the world runs on Linux (and that's a good thing) and every tech company in the world uses Git. That's just how it is.
Mercurial was a tiny bit better but not that much better that it'd compensate for the entire ecosystem and people gravitating towards Git.
IMO the Zeitgeist here leans a bit too much on saying that
- C is everywhere so [Zig/Rust/Nim/Odin] is out of the question
- Git is everywhere so [VCS] is out
- Only [Tech] can be used in enterprise [[what does this mean?]] so [new tech] is out
All of these can still be discussed. Because it’s not simply theoretical. People make their own Fossil repositories. People make things in [Rust/Zig/Nim/Odin]. And the point about some tech being everywhere has the same discussion points each time. So I’m a bit miffed to see this as the top comment.
Programmers use different operating systems, editors, languages - is there any reason we all have to use the same source control tool? We weren’t doing so before Git came along.
Even before git, you generally had to use what your team was using, or the FOSS project you were trying to contribute to. So it's kind of a moot point.
Nothing is forever (and Microsoft owns Github now, so if I were a betting man…)
It’s not that big of a deal with a good UI. Reality is you just use whatever the people that pay you use.
Git had only been around for a handful of years at the time. If not for people slowly adopting it a little at a time, thus leading to the network effect, Git would not have become the dominant VCS of the day. So yeah, when things like this, JJ, etc come along, it's worth paying attention and keeping an open mind cause any one of them might be the "everything else is irrelevant," tool in fifteen years.
And you could probably get rid of like... 90% of things people complain about by just writing better frontend (and some people did that) to same backend
Maybe it is true that name is destiny after all.
That does not matter though. If you need an AI agent for SCM you are already lost and should take a step back.
People will call me crazy, but you can tell Claude Code what you need with Git on your local repo and it will spit out the terminal incantations, you can also... tell it to run them after you read them.