19
Why Git is hard (roadrunnertwice.dreamwidth.org)
submitted 11 months ago* (last edited 11 months ago) by canpolat@programming.dev to c/git@programming.dev
you are viewing a single comment's thread
view the rest of the comments
[-] technom@programming.dev 8 points 11 months ago

Git is a hack that was created by a bunch of kernel hackers with a UI that wasn't originally meant to be the final user-facing UI. If you have done what the kernel devs do, you would understand git. That includes:

  • Taking snapshots of the source tree (perhaps as a zip or tar), along with a file that indicates what snapshot was for, you understand trees.
  • Applying patch queues (with something like quilt), you understand commits, rebasing and cherrypicks.
  • Reversing a patch - you get reverts.
  • Modifying a patch - you get commit amends.
  • Do a 3 way merge - that's a git merge.

There were a whole bunch of ad-hoc kernel dev operations that got consolidated in git. Honestly, a similar tool should rethink the design to be more intuitive, orthogonal and have fewer concepts that cover all use-cases. (No. xkcd doesn't apply here. Git does everything. It just needs a better design).

[-] o11c@programming.dev 9 points 11 months ago

I've only ever seen two parts of git that could arguably be called unintuitive, and they both got fixes:

  • git reset seems to do 2 unrelated things for some people. Nowadays git restore exists.
  • the inconsistent difference between a..b and a...b commit ranges in various commands. This is admittedly obscure enough that I would have to look up the manual half the time anyway.
  • I suppose we could call the fact that man git foo didn't used to work unintuitive I guess.

The tooling to integrate git submodule into normal tree operations could be improved though. But nowadays there's git subtree for all the people who want to do it wrong but easily.


The only reason people complain so much about git is that it's the only VCS that's actually widely used anymore. All the others have worse problems, but there's nobody left to complain about them.

load more comments (6 replies)
this post was submitted on 07 Oct 2023
19 points (88.0% liked)

Git

2634 readers
20 users here now

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

  1. Follow programming.dev rules
  2. Be excellent to each other, no hostility towards users for any reason
  3. 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.

founded 1 year ago
MODERATORS