this post was submitted on 07 Oct 2023
20 points (85.7% liked)

Git

2904 readers
1 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
20
Why Git is hard (roadrunnertwice.dreamwidth.org)
submitted 1 year ago* (last edited 1 year ago) by canpolat to c/git
you are viewing a single comment's thread
view the rest of the comments
[–] o11c 11 points 1 year ago (1 children)

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.

[–] technom 1 points 1 year ago

I use git extensively and everyday. And have used a few others in the past. Some tools like bzr and svn had their share of issues. But I've never heard a git and mercurial user say anything bad about the latter - and that's not just because Hg is used less. It just feels much more consistent and principled.

And about git's unintuitive UI - there is one that trips almost everyone. Everyone knows that git stores commits as snapshots. But few people seem to notice that some operations are clearly based on diffs/patches - that include merging, reverting, cherry picking and rebasing. Even the git book mentions it at one place. Admittedly, I used to use git without that knowledge for a long time. Half of the confusion with git would go once you realize this fact.

For better or worse, we are stuck with git. Might as well develop ways to understand it better. I'm reasonably comfortable with it these days that I rarely spend time resolving git problems.