Learning Git was a struggle but I've warmed up to it
Git
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
Resources
Rules
- Follow programming.dev rules
- Be excellent to each other, no hostility towards users for any reason
- No spam of tools/companies/advertisements. It’s OK to post your own stuff part of the time, but the primary use of the community should not be self-promotion.
Git Logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License.
From someone who's used CVS, clearcase and even subversion, git has really been a massive timesaver.
Yeah even though it definitely has flaws (awful CLI, dumb diff/conflict algorithms) and half-arsed parts (submodules, LFS), it really is pretty great software.
Still, I'm hopeful for the next generation VCS's - Pijul, Sapling and Jujutsu.
In git's defence a perfect diff algorithm seems like a difficult problem to solve in the general case, regardless of VCS.. unless any of the next generation VCSes do better then I would take that as a recommendation to check them out!
Yeah it's probably impossible to get a perfect diff in every case, but that's irrelevant in the same way that the halting problem is true yet formal verification still exists. We don't need perfect, we need "good most of the time".
For example the "slider" problem has existed in Git forever, and apparently there are algorithms that mostly solve it (indent-new
), yet Git still doesn't use them. That repo is 9 years old. I can't remember what led me to that but I think it was one of the new VCS's saying they do well on that benchmark (can't find any reference to it now though).
Pijul should also give better diffs in theory because it actually tracks lines as objects, so it has more information to work with. In the first example in diff-slider-tools
it would know the difference between /*
and /*
. I haven't actually tried it though.
There are also a few semantic diffing tools that understand syntax that could be integrated - notably Difftastic and Diffsitter.
Point is, it could easily be better than it is.