4 ms·
The complexity isn't needless, it is hard to find a part of git that can be simplified without losing something important. But the command line user interface
by roenxi 5y ago
The complexity isn't needless, it is hard to find a part of git that can be simplified without losing something important.
But the command line user interface is one of the worst I've ever seen. The names are bad, discoverability is poor and which command line tool does what doesn't always make sense.
- loudthing 5y agoI completely agree. Git is a product of its requirements. It's not perfect, but it gets the job done, and obviously it does it pretty well.
- quicklime 5y agoProducts don't have requirements, users have requirements :) The requirements of Linus and the kernel developers are completely different from the requirements of the vast majority of users of Git, who are using it in small teams in a centralized way. I would argue that the only benefit that this decentralization gives is a local cache, which makes things nice and fast. Most users don't need to be able to create branches easily (code review tools already let you do that, effectively) and it's just given people enough rope to hang themselves (e.g. GitFlow). IMO the worst aspect of this needless complexity is having to explain to people "you've got 1) the branch central repo, 2) your local copy of that branch, and 3) your local branch". It gets even more complicated when personal forks come into the picture, as there are just so many copies of things to manage or trip over. Try explaining to a junior developer why "git fetch" takes two arguments ("origin" and "master") while "git rebase" takes just one: "origin/master".
- Frost1x 5y agoI'm not sure it's so obvious that it does it well. The thing about the tech industry is there's a lot of cargo cult and leader/follower mentality. There are plenty of shops that use git just because every other shop uses git. Chances are, most of them don't need anything nearly as complex as Git and other version management approaches for their project would suffice just as well. It's sort of how a lot of shops decide they need to incorporate 'AI' into everything, or they need to use microservices and Kubernetes to solve their problem. Some of it is just resume driven development but a lot of it is just observing and following trends.
- occoder 5y ago> The thing about the tech industry is there's a lot of cargo cult and leader/follower mentality. > Some of it is just resume driven development but a lot of it is just observing and following trends. Couldn't agree more. That's exactly what I think happened with git.
- framecowbird 5y agoWhy the while "first stage, then commit" workflow though? Wouldn't it be simpler to just commit?
- andreareina 5y agoOne of the ways I use the staging area is as an ephemeral wip commit: I've got a change that runs and gets me incrementally closer to the desired result, but isn't yet an atomic commit. Changes to that state can be built upon, undone etc until I've got something I'm happy to commit.
- abstract_put 5y agoI often have local changes that I do not want represented in my commit (e.g. that code isn't done yet), so what would I do with those changes? One solution might be to stash them, select files while doing a commit, or otherwise put them aside, but that feels like reinventing the stage-then-commit workflow. That said, adding an alias for adding everything and committing it in one shot seems like a worthwhile quality of life change.
- emodendroket 5y agoI find it's common that I want to change stuff in my local dev environment with changes I don't actually wish to commit -- let's say hardcoding to some folder on my local machine in a configuration file, or something like that.
- alerighi 5y agoLoosing something that a lot of people doesn't need and will probably never use. Beside the Linux kernel (that git was created for) or other big projects, most developer will only use a bunch of features. The command line is shit, one example: `git checkout` can both switch to a new branch or restore a file.
- wyoung2 5y agoFossil is that thing: a simplified DVCS that doesn't have important bits missing. There are certainly cases where Git is the right tool, but it's vastly overapplied, used because it's popular, not because it's the best tool for every job. For smaller projects without a lot of randos offering PRs from the outside, Git's probably costing you more in its complexity than it's saving you by having that complexity at hand.
- aidenn0 5y ago> Fossil is that thing: a simplified DVCS that doesn't have important bits missing. One of Fossil's selling points is that it's missing several important bits (i.e. all the tools for rewriting history)
- ItsMonkk 5y agoExactly. The Linux requirements are the single most complex problem and they need the power of git to handle that complexity. The problem isn't git. The issue is that everyone is using the most complex tool, from solo developer, to 10 developer teams, to 1000 developer projects. You should use the simplest tool that gets the job done for your project[0]. That isn't git, but it's so easy to just pick the thing that "scales". [0]: https://blog.codinghorror.com/the-principle-of-least-power/ https://blog.codinghorror.com/the-principle-of-least-power/