Live data from Hacker News

Ask HN: Can we do better than Git for version control?

news.ycombinator.com

251–260 of 309 posts

Re: Ask HN: Can we do better than Git for version control?

#251
I’ve used CVS, SVN, Arch, and Git. The main benefit of Git seems to be performance and atomicity. Arch was garbage. CVS works on files rather than directories. Git is a bit or a lot faster than SVN. That said, Git is much slower when there are large files in your repo.

Git is much harder to use than SVN. Particularly you see engineers struggling with resolving conflicts.

One benefit of Git was decentralization, but now Git is Github, it is centralized again.

Builds, IDE, programming languages should be 1st-class citizens. I don’t want to wrestle with .gitattributes or .gitignore.

What would I make better?

- Fast with large files. - Simpler. - Improved commit meta-data.

Re: Ask HN: Can we do better than Git for version control?

#252

The inner workings of git are not overly complicated. The real problem is git only provides a thin layer on top of the inner workings. It’s not git that needs replacing, (it’s just saving blobs of data) it’s the user interface on top that is confusing. The problem with simplifying the user interface is that abstracting away the complexity is super difficult.

Git does have one big architectural problem IMO - native unit of storage is a blob, not a diff. Things like rebase, cherry-pick, 3-way merge, etc would be much easier in a world where the storage model was “diffs” instead of “blobs”. This would have resulted in simpler CLI tools with fewer pitfalls.

The two are interchangeable; a computer can make one from the other. Storing deltas makes common operations slower, as getting file contents requires replaying all the deltas through history.

Re: Ask HN: Can we do better than Git for version control?

#254

Theo describes how Graphite was built on top of git (and Github) to improve DX: https://youtu.be/I88z3zX3lMY The main innovations seem to be: - The concept of a "stack" which is somewhere between a commit and a branch, a group of commits. - Better UI, especially for Github notifications. The end result is he feels safer using advanced git features and can move faster, especially when working within a team of multiple…

> - The concept of a "stack" which is somewhere between a commit and a branch, a group of commits.

That seems to be just some conventions for branch naming & rebasing. The most value seems to be in Graphite syncing that state into Github PRs.

It says a lot about these people (e.g. narrator of this video) that they think this is something novel. The Linux kernel community has done "stacked commits" even before Git existed..

Unless it's about webdev & on youtube, it doesn't exist?

Re: Ask HN: Can we do better than Git for version control?

#255
post #24

No, git is perfectly fine. You just need to study it to master it, just like every other tool we use in our craft.

"Fine" is not "optimal". The mere fact that something does the job does not make it the best possible thing that does the job. The most trivial example of a thing that is wrong with Git and which no amount of getting better with the tool can possibly help is "once you generate a conflict, you cannot perform any other versioning operations until you fix the conflict or revert". In particular, for example, you cannot c…

Maybe you want more local clones (git clone -l -s) or to use worktrees, so you can leave a merge conflict pending in one of them?

Git doesn't have a way to "store a partially resolved conflict" in a way that would remember that it hasn't been resolved. If you really want that, maybe you want to just commit the conflict markers and come back later; rebase the commits together once you're all the way done.

Re: Ask HN: Can we do better than Git for version control?

#256
post #100
post #63

Earlier quoted context omitted.

Imagine an electronic engineer complaining about an oscilloscope being hard to use because he cannot explain what all those knobs do to his wife. We are professionals, our tools should be powerful for the advanced user, not beginner friendly.

A tool can be both beginner friendly AND powerful for advanced users. Speaking of your analogy, the role that most software developers fullfil is not an engineer wondering about the oscilloscope, but rather the construction worker installing electrical fixtures wondering why the cable clamp has such a weird interface. Both the oscilloscope engineer in an office and the worker doing the field work would benefit from h…

> IMO the largest share of developers today are doing brick-laying work (which of course takes skill, I am not underestimating it) and would benefit a lot from having simpler tools - they don't need to know how to use an oscilloscope at all.

They're doing brick-laying work until they aren't. Most problems are easy to solve and don't require very much fussing over. The expertise comes in knowing which problems are worth fussing over and which aren't.

Technology is becoming ever more present in our lives, not less.

Reducing software engineering to a low-skill trade when there is, in fact, mountains of complexity is surefire way for software to be a heap of shit. And in a lot of ways it already is.

Re: Ask HN: Can we do better than Git for version control?

#257

Earlier quoted context omitted.

How does diffing and conflict resolution work?

[Not the person you're replying to] Vscode has a built-in (and quite good) 3-way merge editor, and an excellent editable diff view. GitLens also makes it easy to diff any two refs within vscode.

Thanks!

Re: Ask HN: Can we do better than Git for version control?

#258
post #143

Earlier quoted context omitted.

I tried this, and I loved it. It works very well with my workflow. Perhaps the author can explain - when you clone the repo with jj git clone It pulls down a branch that is auto generated like pull-(hash) I can’t understand how not to get that corrupted so when I do a jj log, I get very weird branches or heads or I’m not sure what. Another way to say it is that everything works great until I have to pull down the rep…

Just echoing Martin, but: if you can show the repository that is causing this, or at least a screenshot (or something) showing what you're seeing and post it on GitHub, one of us should at least be able to help figure out what's going on.

I have created a discussion. Thank you both

https://github.com/martinvonz/jj/discussions/2691

Re: Ask HN: Can we do better than Git for version control?

#259
post #86

Earlier quoted context omitted.

There has been a lot of push to commoditize software engineering. Unfortunately that has resulted in a swarm of people who want developer salaries without the work or expertise. Git definitely has some warts but you are right. It is an industry tool for expert, professional use. Some complexity is inherent to the problem of version control. Learning how to use your tools is part of ANY trade.

I disagree. There’s always more that can be learned about anything but we live in a world with finite time and finite resources. So you can either devote time to learning git or you could spend it doing the actual work. The fact that git is used by experts and professionals is not an excuse for poor UX. The experts and professionals are almost never Git experts or professionals. I use my car every day, that doesn’t m…

I think there are two things being conflated here.

One is: how do you effectively manage changes to a codebase over time? Git has a model that, for day-to-day use, has primitives like "commit", "branch", and "tag". You also have to understand the difference between your working copy, what is staged for commit, and any other commit in history. These, in combination with the operations you can do with them is actually somewhat complex. This is the thing I am saying people need to learn. And people quite often complain about it.

The other is the organization of git's porcelain layer, the arguments and flags each subcommand takes, and how stuff is presented back to the user. I think git stands to make significant improvement here. Be that as it may, the tool exists as it is. So your options are to use a different VCS entirely, use a different frontend, or learn how to use git as-is.

If you choose to use git but deliberately avoid learning e.g. what a rebase is and why it's useful, you are choosing to be an ineffective developer. Could it be better in some ways? Yes, but it isn't.

I don't think the car analogy is particularly compelling. The "primitives" of a car are already much simpler than git's. The fundamental primitives of a car are "go faster" and "go slower", along with some supporting things like managing your headlights, windshield defrosting, wipers, and horn.

While additional tools are being added to cars to make them safer (e.g. a backup cam or collision detection), the complexity of those tools is increasing rapidly which makes them more prone to failure. And a driver is absolutely not excused from causing an accident just because one of these safety tools failed. You still have to know how to safely operate your vehicle in a variety of conditions.

Re: Ask HN: Can we do better than Git for version control?

#260
post #77

A lot of people these days have just been thrown into the fire with Git as the first and only VCS they’ve ever seen. I’m not that old, but I’m old enough to have used RCS, CVS, SVN, then finally Git. I started using Git super early, before GitHub existed. You may not believe me, but Git was the answer to all my prayers. All those previous systems had fundamental architectural flaws that made them a complete nightmare…

The git model has fundamental limitations because it saves snapshots rather than changes, and doesn't capture some metadata changes like renames. A tool like Darcs or one of its spiritual descendants will have fewer merge conflicts than git. Totally agree on your main point though. The benefits of switching are far lower than the costs.

Not only merge conflicts I find that this causes trouble if you need to manage multiple branches. Generally you see patterns like 1. Create patch 2. Merge to main branch 3. Backport a cherry pick.

But there is no machine-readable metadata that the commit is the same in both cases. In simple cases you can work around this by basing the patch off of the merge base but if there are conflicts that doesn't work well.

The result of this is that these two different but logically identically commits will cause future merge conflicts and make questions like "does this branch have this patch" much more difficult to answer.

This is something that I think https://pijul.org/ does quite well. Their base unit is a patch and that can be applied to multiple places. You can also have snapshots which are logically a collection of patches.

Post reply on HN