News for hackers. Stuff that matters.
Re:Ask HN: Can we do better than Git for version control? by Apreche on Sunday December 10, 2023 @09:20AM (#38591669)
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 to use on a team for any serious work.

Git has no such problem. There’s nothing it can’t do. Instead, the only limitation is on the user being able to know how to get Git to do what they want it to do. Thankfully, that’s always solvable with a quick read of the documentation or web search.

I understand that people might want to make it easier, since the UI is complex, but that’s never going to work. If you abstract away the complexity of the UI, you will necessarily abstract away the power. If you abstract away the power, you are no longer solving all the problems that Git solved. People just don’t realize what problems are being solved because they never lived through those problems with the previous VCSes.

You know what’s easier than building a new VCS better than Git? You know what’s easier than using a different VCS from the rest of the world? You know what’s easier than designing a miraculous abstraction on top of Git?

Learning Git.

Whatever effort you are putting into seeking or building an alternative, instead put that effort towards becoming a Git expert. It will be a lot less effort with a lot more benefit. Trust me on this. It will be well worth it for your career and for your personal computing life as well.

Re:Ask HN: Can we do better than Git for version control? by dafelst on Sunday December 10, 2023 @12:20PM (#38593116)
While I feel like this is generally true for most programmers and knowledge workers, Git is absolutely not suited to the workflow of several industries, including the one I work in: games.

Working with an engine like Unreal Engine for a project of any reasonable size requires working with both hundreds of thousands of active files (my current project's repo's HEAD has ~400k) and hundreds of gigabytes of active files, many of which are many GB on their own. Our repository (in perforce) is currently in the order of 10TB.

Git, even with LFS and partial clone and shallow copies and fsnotify just falls apart at this scale. Add to that the necessity for less-technical people (artists, designers, VFX, audio, etc) to use it, and it is really just a non starter.

I absolutely loathe Perforce (having used and occasionally admin'd it professionally since 2007), but I begrudgingly admit that is is currently the only publicly available VCS that can fulfill all of the requirements of this industry in a practical way. Plastic and the others just aren't there yet.

Re:Ask HN: Can we do better than Git for version control? by withinboredom on Sunday December 10, 2023 @04:06PM (#38595049)
This is a solved problem with git. I’ve worked on bigger projects than yours with histories that are so big you can’t clone them if you wanted to. I’ll make a note to drop what to google for tomorrow, but basically the history is fully available but git knows how to query it over the network. When you open a file, it loads it over the network. Remote build systems do your builds.

Most of this was built by Microsoft to work on Windows with git.

We moved from SVN in the late 2010’s, and holy crap man, did it change our workflows. No longer were we passing around patch files in a team for code reviews, but actually reviewing code somewhat like on GitHub. It was magical.

Re:Ask HN: Can we do better than Git for version control? by IlPeach on Sunday December 10, 2023 @05:17PM (#38595638)
I shed a tear as I remembered the pain of doing that with SVN
Re:Ask HN: Can we do better than Git for version control? by est31 on Sunday December 10, 2023 @07:53PM (#38596538)
Microsoft had a bunch of solutions to handle their massive Windows repo: VFS for Git (GVFS), Scalar, and now it has a bunch of MS specific patches on top of the official git client, but apparently that one is also not required any more as partial clone is now supported on azure as well (which is another such implementation from Microsoft employees that made it to both GitHub and upstream git).

So yeah, solved problem thanks to Microsoft. Solved multiple times in fact, and because it's Microsoft, only not all had Linux installers: https://github.com/microsoft/scalar/issues/323#issuecomment-...

https://github.blog/2020-01-17-bring-your-monorepo-down-to-s...

https://devblogs.microsoft.com/devops/introducing-scalar/

https://github.com/microsoft/git

https://devblogs.microsoft.com/devops/git-partial-clone-now-...

Re:Ask HN: Can we do better than Git for version control? by withinboredom on Monday December 11, 2023 @03:29AM (#38598690)
Thanks!
Re:Ask HN: Can we do better than Git for version control? by slalomskiing on Monday December 11, 2023 @12:52PM (#38602892)
> Add to that the necessity for less-technical people (artists, designers, VFX, audio, etc) to use it

How is that solved with Git?

Re:Ask HN: Can we do better than Git for version control? by allarm on Tuesday December 12, 2023 @01:25AM (#38610237)
Maybe they just need to follow carefully written instructions created by more technical people?
Re:Ask HN: Can we do better than Git for version control? by Noneofya on Tuesday December 12, 2023 @07:19AM (#38611236)
When has that ever worked? And why does this count as a solution rather than a poor workaround for you?
Re:Ask HN: Can we do better than Git for version control? by allarm on Tuesday December 12, 2023 @08:17AM (#38611697)
What has ever worked, reading and following manuals? Like, forever? Stop pretending there's a simple solution. People just need to use their brains. Both people who write those manuals and those who read them.
Re:Ask HN: Can we do better than Git for version control? by slalomskiing on Wednesday December 13, 2023 @01:23PM (#38631778)
There literally already is a simpler solution for non-technical people, it’s called Perforce and tons of game studios use it

But I’m sure you’re smarter than the whole industry so you probably know better

Re:Ask HN: Can we do better than Git for version control? by allarm on Thursday December 14, 2023 @05:44AM (#38639934)
Hey smart man, this is a thread about git, not perforce. Just fyi.
Re:Ask HN: Can we do better than Git for version control? by withinboredom on Wednesday December 13, 2023 @05:47AM (#38625458)
Since forever? It's not like people are born with an innate knowledge of how any software works.

Manuals/guides/tutorials are the most scalable way to teach people how to do literally anything.

Re:Ask HN: Can we do better than Git for version control? by Noneofya on Tuesday December 12, 2023 @07:16AM (#38611211)
>Most of this was built by Microsoft to work on Windows with git.

Hacking git into something it is not does not qualify as learning to cope with git in my book.

Apparently git does not solve all problems and there is indeed value in exploring other options and building new systems that fill other niches.

Re:Ask HN: Can we do better than Git for version control? by withinboredom on Wednesday December 13, 2023 @05:51AM (#38625498)
umm. it's still git. Git is basically content-addressable storage with a couple of layers on top (heads/tags/trees) which is itself content-addressable storage. If you can offload that storage to a remote, you still have git... and can use git as you've always used git. The tricky part is making it feel like the storage is local and your own, instead of shared.

You only need this when, well, you need it. You can go a surprisingly long way (nearly a decade of daily commits by hundreds of programmers) and stick to vanilla git.

Re:Ask HN: Can we do better than Git for version control? by firesteelrain on Sunday December 10, 2023 @04:06PM (#38595050)
That’s why you need a binary repository like Artifactory and not store your large files in Git. But you can still track them in Git with the large files in a binary repository like Artifactory.
Re:Ask HN: Can we do better than Git for version control? by karmakaze on Sunday December 10, 2023 @12:47PM (#38593293)
This could be solved with references rather than copies if your tools integrated them. e.g. dependencies can be ref'd with source/name and version. To ensure availability all such used blobs could be stored efficiently elsewhere and versioned.

It's great that Perforce works and I've heard others in the graphics field using it, so it satisfies a need. Don't know if/when it would be a general need for say GitHub users.

Re:Ask HN: Can we do better than Git for version control? by Brian_K_White on Monday December 11, 2023 @01:29AM (#38598157)
This sounds like a case of using excel as a db. Holding a hammer by it's head a declaring it unfit for normal people to paint with.
Re:Ask HN: Can we do better than Git for version control? by afjeafaj848 on Monday December 11, 2023 @03:24PM (#38605009)
I also work in games and everyone I know uses Perforce for the reasons mentioned above

Have you considered that maybe they just have a different use case than you?

Re:Ask HN: Can we do better than Git for version control? by Brian_K_White on Tuesday December 12, 2023 @10:47PM (#38622385)
What I mean is, no one ever said that git was meant to hold bulk assets and resources directly, and so doing so is painting with a hammer, not an insufficient pain brush.

Yes of course they have a different use case. That is just another way to say the same thing.

Re:Ask HN: Can we do better than Git for version control? by tester756 on Sunday December 10, 2023 @11:51AM (#38592860)
>I understand that people might want to make it easier, since the UI is complex, but that’s never going to work. If you abstract away the complexity of the UI, you will necessarily abstract away the power.

I disagree, really.

There is not fundamental reason why you cannot have user-friendly UI for 98% of the cases and some "advanced" for those 2%.

Just like GUIs have "advanced" settings, the CLI can have well designed 10 commands for basic usage that are taught to newbies and then advanced ones.

Re:Ask HN: Can we do better than Git for version control? by Apreche on Sunday December 10, 2023 @12:09PM (#38593029)
Do it then. Many have tried. All have failed. Talk is cheap.
Re:Ask HN: Can we do better than Git for version control? by tester756 on Sunday December 10, 2023 @12:13PM (#38593055)
>Do it then. Many have tried. All have failed. Talk is cheap.

I'm, just like many other people using GitHub Desktop (or Git Kraken or Git Extension, but I dont like this one)

when I'm working in GUI environment, that's proof that it is possible.

The problem with creating 3rd party tool that's CLI wrapper is that you cannot rely on it being installed on the system.

That's why such solutions usually fail - because you risk relying on stuff that may not get traction and you'd be better sticking to "official" syntax in long run.

Re:Ask HN: Can we do better than Git for version control? by karmakaze on Sunday December 10, 2023 @12:49PM (#38593322)
Is gitk still a thing that's available with git? Not as full featured but great for viewing and good with many commits/files.
Re:Ask HN: Can we do better than Git for version control? by EstanislaoStan on Monday December 11, 2023 @08:09AM (#38600323)
Yes
Re:Ask HN: Can we do better than Git for version control? by namtab00 on Sunday December 10, 2023 @01:58PM (#38593865)
I'll share here my positive opinion of GitExtensions (on Windows). It has really helped me use and better understand Git, while also helping me define and share workflows with my colleagues..

Other GUIs, like the ones embedded in VisualStudio, VSCode or Rider, try to sell skipping some cognitive steps for some operations as simplifying or speeding up dev flow. I find they are just offering extra (beyond what git itself offers) ways of shooting yourself in the foot.

Re:Ask HN: Can we do better than Git for version control? by accelbred on Sunday December 10, 2023 @12:53PM (#38593349)
Magit is great. So not all have failed.
Re:Ask HN: Can we do better than Git for version control? by martinvonz on Sunday December 10, 2023 @12:58PM (#38593397)
I would say that Mercurial has a simpler UX than Git without being less powerful. I think Jujutsu (see other posts here), which I started, also has simpler UX and is more powerful than Git in many ways. Have you looked at either of those?
Re:Ask HN: Can we do better than Git for version control? by Izkata on Monday December 11, 2023 @01:41AM (#38598220)
About a decade ago, I tried both mercurial and git, and at the time had only subversion knowledge. I remember finding mercurial extremely confusing and git very simple, but don't remember the details about why mercurial was confusing.
Re:Ask HN: Can we do better than Git for version control? by iggldiggl on Monday December 11, 2023 @07:20AM (#38599958)
Whereas conversely I was glad that with Mercurial I no longer had to deal with Git's staging area (for me, Mercurial's interactive commit serves the same purpose).
Re:Ask HN: Can we do better than Git for version control? by jacobegold on Sunday December 10, 2023 @04:53PM (#38595444)
Plenty of folks are!
Re:Ask HN: Can we do better than Git for version control? by eviks on Monday December 11, 2023 @02:42AM (#38598472)
But your talk "it's impossible, trust me" is cheaper since it's a much stronger claim
Re:Ask HN: Can we do better than Git for version control? by lamontcg on Sunday December 10, 2023 @02:22PM (#38594082)
The problem is that for 99.99% of the people engaged in the debate over if git is good or not and should be replaced the correct answer for them is "stop fighting it and just learn git" because there's nothing better. They need to stop thinking about how git sucks because that is literally getting in the way of their career goals and is self-sabotage.

And if anyone seriously wants to try to replace git they need to understand how git works first at the level of an advanced expert first anyway. At that point, you can have the discussion about how to make git, with better LFS/monorepo support, with a more pleasant UI/UX, etc.

Re:Ask HN: Can we do better than Git for version control? by Noneofya on Tuesday December 12, 2023 @08:01AM (#38611589)
1. That‘s called stockholm syndrome.

2. Literally no relevant career goal is significantly obstructed by less git proficiency.

Re:Ask HN: Can we do better than Git for version control? by gitaarik on Wednesday December 13, 2023 @03:32AM (#38624299)
What? Maybe I'm misunderstanding you, but are you saying that absense of git knowledge is not a factor for career possibilities? I guess it depends on the kind of job..
Re:Ask HN: Can we do better than Git for version control? by gitaarik on Wednesday December 13, 2023 @03:29AM (#38624278)
Isn't this the case with git? If you only do basic stuff I think you don't need more than 10 commands. And if you wanna go more advanced, you have the other commands and flags. Git has also added some new commands like `switch` to make it easier for newbs.
Re:Ask HN: Can we do better than Git for version control? by jampekka on Sunday December 10, 2023 @12:19PM (#38593107)
> I understand that people might want to make it easier, since the UI is complex, but that’s never going to work. If you abstract away the complexity of the UI, you will necessarily abstract away the power.

There's a lot of "useless" complexity in the Git UI. The naming of the commands and the underlying concepts are quite inconsistent. The commands themselves are inconsistent. It's rare to see somebody, even git fans, to dispute that the UI is far from optimal. And the warts in the UI are being improved.

These UI warts start to become invisible when you get used to them, but e.g. when teaching git they become painfully obvious again.

The underlying git architecture is simple and it's the simplicity that makes git powerful. Powerful tools don't necessarily need complex interfaces. In fact power often comes from simple interfaces that compose well.

Re:Ask HN: Can we do better than Git for version control? by mejutoco on Monday December 11, 2023 @03:59AM (#38598845)
We could get aliases that get slowly incorporated into git. Like, let's say git undo instead of git reflog, or things like that. It would not be too difficult to support a couple of names to do the same thing and let people use the one they prefer.
Re:Ask HN: Can we do better than Git for version control? by jampekka on Monday December 11, 2023 @05:19AM (#38599231)
We are slowly getting those. For example there's now git restore (and git switch) to fix the god-awful overloaded checkout.

When you get your repo into a state that needs reflog, it's probably not amenable to very straightforward commands. A bigger problem is that it's a bit "too easy" to get into that kind of state.

The original git interface wasn't really intended for "general use" and there was supposed to be the friendlier "porcelain" on top of the lower level "plumbing". But people started to use the plumbing directly and the porcelain never came to be.

Re:Ask HN: Can we do better than Git for version control? by bryanlarsen on Sunday December 10, 2023 @09:51AM (#38591865)
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.

Re:Ask HN: Can we do better than Git for version control? by mikewarot on Sunday December 10, 2023 @12:14PM (#38593067)
>it saves snapshots rather than changes

Once you understand this, GIT makes a whole lot more sense. The trouble with failed merges is an artifact of trying to appear like it tracks deltas. Merge conflicts when you're the only programmer on a product (but have multiple computers) are maddening.

I blew away .git and everything in it, restarting a repository, more than once because I couldn't resolve a merge conflict, before I learned that simple fact.

I've got from .zip files of my source code on floppy disks, to SVN, then Mercurial, and finally GIT. GIT is amazing, though the UI is a pain, as most agree.

Re:Ask HN: Can we do better than Git for version control? by rendall on Sunday December 10, 2023 @12:23PM (#38593134)
> doesn't capture some metadata changes like renames

If you rename the file using git and that is the only change in your file, then it works:

  git mv oldfile newfile
Commit that change and the rename is in your history.
Re:Ask HN: Can we do better than Git for version control? by blibble on Sunday December 10, 2023 @12:32PM (#38593187)
the rename won't be in your history because the tree and commit objects don't support renames

the tooling infers a rename based on the lack of a content change

Re:Ask HN: Can we do better than Git for version control? by trevyn on Sunday December 10, 2023 @02:13PM (#38593994)
Is there a difference?
Re:Ask HN: Can we do better than Git for version control? by phyzome on Sunday December 10, 2023 @04:12PM (#38595101)
Absolutely. In a move-and-edit situation, git will sometimes infer a rename and sometimes not, based on your local version of git, your settings, and the details of the edit. If inference fails, you may have a harder time resolving merge conflicts, performing cherry-picks, etc.
Re:Ask HN: Can we do better than Git for version control? by trevyn on Friday December 15, 2023 @04:38AM (#38652538)
So just make sure the moves and edits are in separate commits?
Re:Ask HN: Can we do better than Git for version control? by phyzome on Sunday December 17, 2023 @08:38AM (#38672754)
Yes, that's the standard workaround.
Re:Ask HN: Can we do better than Git for version control? by dafelst on Sunday December 10, 2023 @05:54PM (#38595865)
Absolutely, the inference is based on a set of heuristics and is often just plain wrong.
Re:Ask HN: Can we do better than Git for version control? by rendall on Monday December 11, 2023 @09:43AM (#38601054)
I've had one or two really annoying merges that were complicated by these renames. TIL thanks to these responses that it's not actually a rename.
Re:Ask HN: Can we do better than Git for version control? by shard_ on Sunday December 10, 2023 @05:37PM (#38595758)
`git mv` is just shorthand for `git rm` and `git add`. All Git knows is that there was a file called `oldfile` and there's now a file called `newfile`, and whether or not they have similar contents or filenames. It's only when you run `git status` or `git diff` or whatever that it actually tries to guess if anything was renamed. So what you're seeing isn't the rename being recorded in history but just that guess being correct. It's easy for it to become incorrect if you make some nontrivial changes or have multiple similar files.
Re:Ask HN: Can we do better than Git for version control? by creatonez on Sunday December 10, 2023 @08:10PM (#38596619)
The parent comment's suggestion is to commit each of these moves individually, which should guarantee that the detection algorithm will get it right. Will definitely pollute your history, though.
Re:Ask HN: Can we do better than Git for version control? by Dylan16807 on Sunday December 10, 2023 @08:43PM (#38596768)
> If you rename the file using git

Does nothing. Git won't remember you did it.

> and that is the only change in your file

This always works, but it means you need to choose between flaky rename detection and weird extra rename-only commits that probably don't compile.

Re:Ask HN: Can we do better than Git for version control? by tehbeard on Sunday December 10, 2023 @10:55AM (#38592375)
> ..because it saves snapshots rather than changes..

I might be misremembering the technical details, but isn't that only the case in a git repo with zero pack files?

Will grant that the lack of metadata on renames can be issue when a file is heavily refactored alongside it's relocation.

Re:Ask HN: Can we do better than Git for version control? by bryanlarsen on Sunday December 10, 2023 @11:59AM (#38592938)
Re:Ask HN: Can we do better than Git for version control? by kevincox on Monday December 11, 2023 @12:26PM (#38602530)
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.

Re:Ask HN: Can we do better than Git for version control? by gitaarik on Wednesday December 13, 2023 @03:46AM (#38624417)
Don't the snapshots make it much faster than without?
Re:Ask HN: Can we do better than Git for version control? by flohofwoe on Sunday December 10, 2023 @11:38AM (#38592752)
Git keeps the entire history on your local machine, this becomes a problem if your project grows to several hundred GB (not untypical in game dev). Even SVN was much better for working with large repositories, you only needed a big server. Git is quite nice for "source code only projects though".
Re:Ask HN: Can we do better than Git for version control? by anonuser123456 on Sunday December 10, 2023 @12:25PM (#38593146)
git supports shallow clones.
Re:Ask HN: Can we do better than Git for version control? by syndicatedjelly on Sunday December 10, 2023 @11:51AM (#38592863)
Does Git LFS help with this problem?
Re:Ask HN: Can we do better than Git for version control? by robaato on Sunday December 10, 2023 @12:20PM (#38593115)
Have seen various teams have major issues with LFS - becoming quite a support overhead to keep art teams productive.
Re:Ask HN: Can we do better than Git for version control? by flohofwoe on Sunday December 10, 2023 @12:24PM (#38593135)
Yeah exactly this. Git LFS is supposed to fix the problem, but I haven't seen it working flawlessly either yet.
Re:Ask HN: Can we do better than Git for version control? by syndicatedjelly on Sunday December 10, 2023 @02:46PM (#38594330)
Interesting, I had issues using Git LFS to store images for my personal site. I thought I just didn't know how to use it properly...
Re:Ask HN: Can we do better than Git for version control? by jzl on Sunday December 10, 2023 @12:47PM (#38593302)
Not Git LFS, but Git VFS, now replaced by “Scalar”:

https://github.com/microsoft/scalar

Re:Ask HN: Can we do better than Git for version control? by sireat on Sunday December 10, 2023 @01:14PM (#38593532)
Overall LFS feels a very hacky tacked on solution with warts.

Git LFS is horrible if you mistakenly add some file(s) to LFS.

Restoring to LFS-less state is supposed to be easy but it is always very painful.

There should be a way to tell repo - I do not want any LFS at all. In practice this is painful, and it is easier to start a new repo....

Also for some reason Github/Microsoft decided to "monetize" LFS. The freebie limits are 1GB for hosting AND transfer! Then the charges get very expensive.

I am not sure why Github LFS is priced like some AWS S3 plan not OneDrive plan.

Re:Ask HN: Can we do better than Git for version control? by vtbassmatt on Sunday December 10, 2023 @03:46PM (#38594881)
GitHub charges for LFS and has since they initially introduced it, way before Microsoft was involved. Also, the pricing model is changing and will include a minimum of 10GiB for free (250GiB for Team/Enterprise customers). It’s cost-recovery and abuse-prevention, though, not some nefarious scheme. And funny you mention AWS S3... what costs might GitHub be recovering? ;)

Microsoft’s homegrown LFS implementation (in Azure DevOps) does not and has never charged for LFS. It’s nice to have friends with a cloud blob storage service!

Source: I was the product manager for Azure Repos’s LFS server and am currently the product manager for all things Git at GitHub.

Re:Ask HN: Can we do better than Git for version control? by jzl on Sunday December 10, 2023 @12:44PM (#38593268)
Microsoft created the git virtual file system to address this so that they could move Windows to git. It has since been replaced by “Scalar”.

https://learn.microsoft.com/en-us/previous-versions/azure/de... https://github.com/microsoft/scalar

Re:Ask HN: Can we do better than Git for version control? by janosdebugs on Sunday December 10, 2023 @04:25PM (#38595213)
I have a lot of huge files and use SVN with it. It's dirt cheap to host, next to no memory requirements, and it comes with a web UI to boot because it's built in top of WebDAV. You can literally open a repo in the browser.

The only downside is the per-file versioning, the update needs to be run on the top directory otherwise interesting problems happen.

Re:Ask HN: Can we do better than Git for version control? by kevincox on Monday December 11, 2023 @12:31PM (#38602587)
This is true, but it is technically an implementation issue. Git supports shallow and narrow clones. The data model works fine with only partial local knowledge. That being said the "check out all files to disk" approach does have fundamental limits for many operations. It is one of the very few operations that are linear with the tree size but it isn't fundamental to the abstract model of Git. To solve this something like a virtual filesystem that fetches new data as required and tracks changed files can make almost all daily operations scale with the size of the patch, not the size of the tree. The data model for this tracked change would be basically equivalent Git's index structure, just applied to the working tree instead of leaving the working tree on a general purpose filesystem.

That being said the unfortunate truth is that many, many, many users of Git rely on the implementation as the API, directly reading and writing to all corners of the `.git` directory. So even if the core command could support something like this (or a wrapper could be provided) it would likely run into a lot of tooling issues.

Re:Ask HN: Can we do better than Git for version control? by agumonkey on Sunday December 10, 2023 @12:48PM (#38593312)
That's what i liked about git too. It felt like a powerful, ready to use tool. CVS and SVN were more bureaucratic, slower and limited. Took zero second for me to drop everything else.

The underlying model is alien to many, it requires non black box approach to get out of pits sometimes but to me it's always worth knowing.

The only decision I dislike about git is the soldered staging area idea. There's a reason why most people end up stashing 109 times a day, and I think there's a golden idea in merging the two

Re:Ask HN: Can we do better than Git for version control? by cflewis on Sunday December 10, 2023 @02:18PM (#38594054)
This post is a terrible failure of imagination that would make one stop language development as C because it was so much better than Assembly.

If you have no problems with Git, then I’m happy for you. I certainly have problems with Git, eg its inability to handle large repositories meaningfully (enjoy a Chromium checkout!), the arcane CLI commands, the shut-your-eyes-and-hope of moving commits between branches and other sharp edges.

That Git has been as resilient as it has is largely a function of being written by Torvalds and GitHub network effects. It isn’t for lack of better/as good features found in other VCS methodologies.

Re:Ask HN: Can we do better than Git for version control? by sroussey on Sunday December 10, 2023 @02:24PM (#38594107)
git still has issues with lots of files. I downloaded the sec Edgar database as files and I thought it would be nice way to store and watch changes.

Nope.

So slow. It does not like millions of files. And all my tooling that does a “quick” git status locked up the terminal, vs code, etc.

Re:Ask HN: Can we do better than Git for version control? by onedognight on Sunday December 10, 2023 @03:01PM (#38594484)
Did you try the file system daemon (git fsmonitor--daemon start) that’s built into git that was designed to speed up git status on many files?
Re:Ask HN: Can we do better than Git for version control? by penguin_booze on Sunday December 10, 2023 @02:22PM (#38594083)
> its inability to handle large repositories meaningfully

Out of curiousity, what other SCM tools can pull this off better?

Re:Ask HN: Can we do better than Git for version control? by cflewis on Sunday December 10, 2023 @02:37PM (#38594232)
I haven’t played with many because I simply don’t have the time between work (Google’s Piper and Git) and kids. Piper handles the monorepo by only offering files when requested by the file system at the specified commit (this is probably a gross or even incorrect simplification, but is how it presents to the user).

There are good reasons that one should keep the whole commit history to distribute a source of truth, but at the same time if one is going to place full trust in something like GitHub (as many do), there’s no reason that full trust can’t be given to a similar website that provides a Piper model with some mechanism to request more than one commit to be brought to local storage (to get more sources of truth).

End of the day, a large repo checkout is going to be limited by either your network, your CPU/storage to perform archive expansions, or frequently both. I get the impression that Android and Chromium are expanding faster than those other things are improving, but have no data to back that up.

Re:Ask HN: Can we do better than Git for version control? by slalomskiing on Monday December 11, 2023 @12:54PM (#38602931)
Almost every big game studio uses Perforce
Re:Ask HN: Can we do better than Git for version control? by dasil003 on Sunday December 10, 2023 @08:51PM (#38596816)
I think it's definitely possible to create a better CLI than git, however I think the majority of what unhappy users of git are imagining when they ask for a better UI would oversimplify things and end up removing a lot of valuable capabilities. These capabilities may not be suitable for a non-technical audience, but I believe should be table stakes for professional software developers as they are very sharp tools for managing the software development lifecycle that transcend specific languages or domains one may be working in.

To take your example of moving commits between branches, the git rebase parameters and --onto flag are definitely confusing, but each of them is clear and necessary when understood. The CLI could be refactored to be clearer, but the hard part is understanding what each one means, which you would need to do anyway even with a better CLI. Obviously one can work around these knowledge gaps, but once you understand them they are useful for an entire career and the warts tend to fade in importance relative to the value of a tool with the insane power-to-weight and rock solid architectural tradeoffs of git.

Re:Ask HN: Can we do better than Git for version control? by mmis1000 on Monday December 11, 2023 @02:34PM (#38604377)
There is a major misconception that you move your "commit" around. Actually, each commit in the git history refer to a specific directory state and parent of such commit. You can't meaningfully "move" a commit directly. What the cherrypick and rebase does is.

1. The client diff content of your commit with previous one. 2. Apply such diff on content of another commit. 3. Create a new commit with the old commit message/author of commit in step 1.

And that is also what make git work for everyone, because it is simply a directory that contains tons of new_new_updated_project on steroids. It's up to you to decide what to do with it.

Re:Ask HN: Can we do better than Git for version control? by Aperocky on Monday December 11, 2023 @03:30PM (#38605090)
> arcane CLI commands

Are the syntax of the commands the issue or are all CLI commands arcane to you? What would you propose to be the command syntax if you were designing it?

Re:Ask HN: Can we do better than Git for version control? by nunez on Sunday December 10, 2023 @02:33PM (#38594195)
Wholeheartedly agree.

Going from SVN to Mercurial was a night and day experience. Going from Mercurial to Git was a marginal improvement initially but a lasting change long-term.

Then there are the "visual" VCSes like Rational and TFS that are designed to _only_ work within an IDE and grokking them involves wading through hundreds of pages of corporate tech docs.

VCSes (or at least the ones I used) were generally awful before Git.

Re:Ask HN: Can we do better than Git for version control? by em-bee on Sunday December 10, 2023 @02:39PM (#38594257)
i mostly agree that git can do almost anything (but see the limitations others bring up), however this claim is easy to disprove:

Whatever effort you are putting into seeking or building an alternative, instead put that effort towards becoming a Git expert.

building an alternative naturally is more work than to learn git for one person, but not everyone needs to do that. a few people building an alternative could save the learning effort of many more people.

instead i'd like to point out a different reason why rebuilding git may not solve the problem:

git is good because it is powerful and flexible.

that power and flexibility by necessity makes git more complex and difficult to use.

you can build a simpler system, but then half of todays git users won't be able to use it because it won't have the features they need.

and a system that has all the features of git today and also solves the problems it currently has will be even more complex and less straigt forward to use.

the best approach is probably to have a common backend that has all the power and flexibility needed, and multiple different frontends that are simplified to only expose the features needed for a particular workflow.

Re:Ask HN: Can we do better than Git for version control? by mlsu on Sunday December 10, 2023 @04:58PM (#38595499)
All software construction involves essential tasks, the fashioning of the complex conceptual structures that compose the abstract software entity, and accidental tasks, the representation of these abstract entities in programming languages and the mapping of these onto machine languages within space and speed constraints.

Git solves the deeply complex problem of distributed version control. Most complaints about git are actually complaints about the essential complexity of the problem, not the accidental complexity of the tool used to solve it.

Re:Ask HN: Can we do better than Git for version control? by jltsiren on Sunday December 10, 2023 @06:37PM (#38596131)
Most complaints about git are about the design philosophy of the tool. While there are complex edge cases in distributed version control, the vast majority of situations people actually encounter are not that complex. But because git prioritizes the worst case over the typical case, it's much less usable than it could be.
Re:Ask HN: Can we do better than Git for version control? by baazaa on Sunday December 10, 2023 @10:03PM (#38597175)
Totally agree that people spend way too much time complaining about git's solutions but there's not nearly enough criticism of the fact it's solving the wrong problem 99% of the time.

I want to share 5k LOC with a colleague. Anyone who thinks that requires a decentralised solution in 2023 is unwell.

I recently wasted a few hours because I forgot to fetch before running some code. Sure the UI could be better (if you're very tired and you're told you're up-to-date you'll stupidly believe it), but fundamentally the 'feature' that caused this problem is something I'll never use. I'm always going to code with a connection to the internet. I shouldn't need to mentally keep track of local vs remote because that distinction simply shouldn't exist.

Re:Ask HN: Can we do better than Git for version control? by yencabulator on Monday December 11, 2023 @10:09AM (#38601288)
What you fail to understand is that, outside of all talk about decentralization, keeping local state is a huge performance optimization. Tagging a large CVS tree used to take several minutes, because it would talk to the remote server separately about every file. History browsing & bisect are very pleasant in Git because the local computer already has all the information, and just needs to present it to you.
Re:Ask HN: Can we do better than Git for version control? by baazaa on Monday December 11, 2023 @05:59PM (#38606682)
You can still cache things locally, it's just shouldn't be something the user has to be aware of. What I'm typing now isn't immediately being communicated to the central server every keystroke, there still is local state, but it's still a client-server architecture.

The repos I work on are often smaller than the average webpage, I'm really not buying the idea that in the age of HD streaming bandwidth-concerns are an issue here.

Incidentally none of the teams I've worked on ever even use any git features like bisect. The cult of git means everyone has to use git, even though for most people that just means many hours wasted googling with absolutely nothing to show for it (as in git is strictly inferior than just sharing files across a networked drive for many teams' use-cases).

Re:Ask HN: Can we do better than Git for version control? by yencabulator on Monday December 11, 2023 @06:03PM (#38606722)
Caching is trickier than decentralization because it's hard to know when the cache is valid. Fetch/push make that explicit, and not git's concern.

Meanwhile, others work in airplanes and in the woods.

Not using git bisect is your loss. I'm very happy it exists, and wouldn't trade git for just files on network drives.

Re:Ask HN: Can we do better than Git for version control? by baazaa on Monday December 11, 2023 @06:26PM (#38606906)
Yes and pushing 'when do i update to/from the server' onto the user is exactly what I'm complaining about. No other software I use does this. Even software originally built to do things locally allows you to seamlessly update to/from a server nowadays (e.g. working on a cloud document in Word say). And any software built from the ground up to do this tends to have a great user experience (e.g. Figma).
Re:Ask HN: Can we do better than Git for version control? by yencabulator on Monday December 11, 2023 @07:44PM (#38607622)
You can absolutely build a system that fetches a git remote whenever it updates, you just need some sort of a notification/subscription system to know when to trigger it.

You can absolutely build a system that pushes (some of?) your branches on every commit.

For me personally, that'd be annoying; every time I talk to the git server, I want to insist on a Yubikey touch.

Re:Ask HN: Can we do better than Git for version control? by protomolecule on Monday December 11, 2023 @06:19PM (#38606844)
"History browsing & bisect are very pleasant in Git because the local computer already has all the information, and just needs to present it to you."

Probably the only thing that makes me not miss SVN too much.

Re:Ask HN: Can we do better than Git for version control? by Affric on Sunday December 10, 2023 @09:43PM (#38597101)
Great comment.

Git really needs a good git tutor game.

Like vim tutor or any one of the n*x/shell games.

Re:Ask HN: Can we do better than Git for version control? by grecy on Monday December 11, 2023 @10:28AM (#38601440)
> I’m old enough to have used RCS, CVS, SVN, then finally Git

I'm old enough to have used CVS, SVN and then a bit of git.

I remember the big selling point to go from CVS to SNV was "you can put binaries in there!" ... which we never did.

And now I see the selling point to go from SNV to Git is "you can do really complicated stuff like rebase".... which we've never done.

For a team who just does run of the mill distributed version control stuff (commits, diffs, blame, conflict resolution), can you explain why git is such a huge benefit over SVN?

Re:Ask HN: Can we do better than Git for version control? by gitaarik on Wednesday December 13, 2023 @04:01AM (#38624546)
SVN doesn't do very good conflict resolution. It especially becomes more of a problem when you have multiple people working on several branches, that might want to merge some of each other's work. Apart from this, git also came with many more advanced features that improves branch and history management.
Re:Ask HN: Can we do better than Git for version control? by darose on Monday December 11, 2023 @01:13PM (#38603203)
> Git has no such problem. There’s nothing it can’t do.

It can't display me the branch I'm working on, starting from the commit that began the branch, until the last commit. (Or if it can, I have no idea how to do it.)

This isn't a functionality issue, but rather a conceptual one. Git just fundamentally thinks of branches differently than I do. (And, maybe most humans?) To me, a branch begins ... when I branch it. To git, a branch begins ... at the very first commit ever in the repo, since they consider commits that were made before the branch point to still be part of the branch. The branch point then is just another commit to git - and not even one that they think is important enough to highlight. But without any ability to clearly identify the branch point, you can often find yourself looking through a forest of commits that are irrelevant to what you're really searching for.

I spent the better part of an hour the other day trying to figure out how to identify my branch point. (For the record, the best solution I eventually found was: cat .git/refs/heads/<branch name>.) Just my $0.02, of course, but IMO this is absurd - and a big feature gap / user friendliness issue with git compared to other VCS's.

IMO git is just another step in the evolution of VCS's, and not necessarily even one of the better ones. Its concepts, functionality, and feature set are focused primarily on distributed development and multiple people maintaining different source trees ... which is fine for the Linux kernel and other projects that heavily use that use case. But many/most projects don't work that way, and for them a centralized VCS is sufficient. I have no doubt that a better VCS will come along and replace git one day.

Re:Ask HN: Can we do better than Git for version control? by kmacleod on Monday December 11, 2023 @07:15PM (#38607371)

  git log <base-branch>..<branch>
I often need the count of commits, usually for build IDs,

  git rev-list --count <branch> ^<base-branch>
I usually use gitk for visualizing branch commits. CLI equivalent is

  git log --graph --oneline --all
Re:Ask HN: Can we do better than Git for version control? by liveoneggs on Tuesday December 12, 2023 @07:31AM (#38611340)
he is saying that finding <base-branch> is too hard. There is probably some magic with git merge-base or git show-branch but I don't know them well enough to do it