6 ms·
Why Don't I Like Git More?
- steve_gh 3y agoFossil? (/www.fossil-scm.org)
- chmaynard 3y agoRegardless of how we feel about using Git, it's comforting to know that Git loves us unconditionally.
- culebron21 3y agoI recently switched my personal project to Mercurial, and boy it removed a whole lot of mental friction!
- tankfeeder 3y agopijul
- bun_terminator 3y agoI've given up on git a long time ago. At every place I worked there was a different set of rules and software to interface it. And at every place, there were git gurus, who are needed because every repo has places with labels like "this branch is cursed and bugged, ask xy before using". Not a week goes by without a git emergency. It's laughable that something like that is trusted with code. I've also used svn for a long time, and I remember it fondly. With git, you use git. With svn, you can actually code. Since it's become non-optional to use git, I just use commits and logs. I don't even bother with branches anymore, they bug out too often. I've become so jaded about tools, and git is a major reason for it.
- stewx 3y agoIf you actually prefer SVN over Git, then your workplace is definitely using Git very, very wrong.
- bun_terminator 3y agoI prefer copying folders on usb sticks over git
- EarthLaunch 3y agoNo True Git fallacy. If you don't enjoy Git, it wasn't Git as it's meant to be! There's always something 'wrong' with Git because it's incredibly complex. Most developer flows don't require that complexity, but have to pay for it anyway. That's the article. When I have significant changes, I copy the directory before messing with Git beyond regular commands, because it's so easy to nuke code with it. Someone could tell me I'm doing it wrong, but an LLM could generate that comment at this point, so don't bother.
- stewx 3y agoCounterpoint: sometimes teams actually do use a tool poorly, and it ruins the experience for people and makes them think something is wrong with the tool itself. You're allowed to not like Git, but the complaint "branches are buggy" suggests that there are problems with the team's workflow.
- jeltz 3y agoYeah, this is a very unique complaint which makes me think OP is the one doing something seriously wrong.
- CuriousCosmic 3y agoOkay serious question though. How many developers have actually read any of the git instructional material? Like beyond just peaking at the reference/man pages. Git's docs have quite well written guides and introductory material but how many developers have ever even read those docs, even in part? I can't think of a single other tool or library I use on a regular basis that has documentation but it's considered standard practice to just ignore all those docs and "wing it" based on colloquial knowledge and random copypasted snippets from stack overflow. Everywhere else in the tech space RTFM is standard practice but as soon as you say that with git, it's interpreted as if it was said with complete and utter condescension. (aside: you can still dislike git and there are perfectly valid reasons to but so often I see people argue that git is bad without ever having experience following the instructions printed on the tin)
- jeltz 3y agoI have never been at a place with cursed branches and I have no idea how that can possibly happen in git. Sorry but your colleagues were just totally incompetent.
- bun_terminator 3y agoPeople say that, but my experience has been like that over a decade at many different places. Just a month ago my git.exe crashed (!) during a commit. It just doesn't work as a tool at all. I always copy my entire work folder before a commit because there's a realistic chance that git messes it up. Every commit is pain and Russian roulette
- jeltz 3y agoNever heard of this complaint before or anything even remotely like it. Your problem is quite unique.
- bilekas 3y agoI knew the author was going to go point to SVN. If you're working on any kind of team doing work in parallel.. Just dont bother with SVN. Got can get into strange states sometimes but I've never not been able to fix it. I don't personally find the same difficulties as the author though.
- happymellon 3y agoThey don't actually sound like someone doing any real work. > Why do I need to download 500 files in a project if I'm only going to edit 3 of them Either their project structure sucks and they combine a lot of unrelated items together, or this guy is just an manager/architect who isn't making any significant changes but wants to poke in the codebase.
- g4zj 3y agoThis stuck out to me as well. Why do you need to download the entire project? So you can build/compile/launch it and view/test your changes. Are we just talking about a README.md file here?
- joshka 3y agoThe author is in devops[1], which intuitively seems like the sort of job that would have that 'not making any significant changes, just working on single files' type of flow that isn't the same flow as a standard dev approach (where it's common to work across an entire repo). So it's understandable from that perspective that they might come to that conclusion. Put another way, in a software product, you bring down those 500 files because you want to locally make sure that your changes to the 3 files you care about are compatible with the 500 files you don't. In a dev-ops repo, perhaps they are dealing with a situation where small amount of files they deal with have less impact on the whole. [1]: https://matduggan.com/about-me/ https://matduggan.com/about-me/
- jmholla 3y agoI'm in DevOps and this desire to view an entire repository through the small lens of a few files concerns me, specifically for the reasons you call out. > In a dev-ops repo, perhaps they are dealing with a situation where small amount of files they deal with have less impact on the whole. Do they not test against the real thing and assume their test cases hit every corner case? Edit: Also as a DevOps person it is your responsibility to make sure things work well. If this is onerous for you and you're not doing anything to make it better and instead are trying to shy away from the reality of working with the reposit, you're doing your job wrong.
- logro 3y ago> this is massive overkill Then just create a few aliases for yourself and forget the rest. People think that git is complex. It is. The task it's accomplishing is insanely complicated.
- Dylan16807 3y agoStoring a whole bunch of version of a directory, with parent versions, isn't that complicated. Easily accessing, rearranging, and merging the changes between those versions gets complicated, but git isn't actually very good at those parts!
- ericyd 3y agoOpening line > I've been working with git now full-time for around a decade now. Duplicated "now". Boom, roasted.
- g4zj 3y ago> I think the people not satisfied with git are told that is a result of them not understanding it. People are told this because it's generally true. Of course, it's not the case for everyone, but I find that most criticisms of the tool focus heavily on remembering how to use it. (The author does mention some missing features, which is valid, but git can't be everything for everyone. In those cases, perhaps it's not the appropriate tool.) > I need to always deeply understand the difference between reset, revert, [...] > You need to remember that push and pull [...] > When it comes to merging, you need to think through the logic [...] Yes, you need to understand, remember, and think. Git (and other similar tools) solve a complex problem and doing so in a simple way would likely restrict teams into a small set of possible workflows. I find that using git is quite simple once the project team has established the processes where the tool is used, and understands git's role in those processes. In my experience, most day-to-day tasks involve using the same small handful of git subcommands, and issues that arise are quite easily fixable.
- deliriumchn 3y agoquite enterteining that majority of "I don't like X" articles are coming from people who can't use the tool because they're lazy to understand basics
- deely3 3y ago> because they're lazy to understand basics or because tool is unnecessary complicated?
- computerdork 3y agoI don't know, the person writing this article seems to understand git and doesn't like it (and yeah, I agree with him, and I'm good with git too, but think it's unnecessarily complicated - Perforce does everything Git does, and it's way easier to use, although it is a paid product).
- duggan 3y agogit is fundamentally a sort of database. If people think about it as having a not-dissimilar level of complexity, use cases, and users to Postgres, the complexity shouldn't be too surprising. Like anything used by a lot of people to solve real problems, it has warts and duct tape, but, honestly, git feels like the least troublesome part of my daily workflow.
- EarthLaunch 3y agoThis was on the front page but completely disappeared. Guess it was being flagged for no good reason. It's a good article. Luckily I can still find yesterday's article about credit cards rewards at the top. I think there's a perverse incentive around flagging.
- throwitaway1123 3y agoHN's flamewar detector penalizes stories with a high comment to upvote ratio, and they also penalize flagged stories too of course. It's one of the reasons why I browse /active quite a bit instead of just the front page.
- EarthLaunch 3y agoThanks for the tips, I didn't know about /active!
- throwitaway1123 3y agoGlad I could help. There's a whole repo full of undocumented HN features: https://github.com/minimaxir/hacker-news-undocumented https://github.com/minimaxir/hacker-news-undocumented
- zdw 3y agoMost of this is not hate on Git, but hate on the frankly garbage GitHub integration model that is merge based. Other git tools like Gerrit that focus on rebases and chaining of commits are far superior in terms of getting code through review in a clean and efficient manner.
- JohnFen 3y agoI really hate git a lot and wish I didn't have to use it. I find that it gets in the way and adds complication without providing compensatory benefits. I consider it a step backwards in version control. I've often wondered why I seem to be in the minority on this opinion. Most devs seem to be OK with it, and many love it. I have no idea why. The only thing I can think of is that git operates in a very specific way and either your brain is in sync with that way or it isn't. One thing I disagree with in the article: > More specifically, it doesn't work offline It absolutely does. Maybe the author is confusing git with one of the bit-based services like github?
- keybored 3y ago> It absolutely does. Maybe the author is confusing git with one of the bit-based services like github? That was the most confusing paragraph. It says that “pull request” merges aren’t part of Git or something. Of course the merge itself is part of Git. I certainly would have heard something by now if people were getting different merge results when using GitHub compared to git(1). Also > Most of that distributed history gets thrown away when I do a squash. Step (1) use squash; step (2) complain that squash throws the history away.
- fanf2 3y ago> “Dump the decentralized model” I’m not sure it’s possible to do so without a huge regression in usability. Multiple people working concurrently on a codebase is a fundamentally decentralized activity. One of the big problems with the cvs/svn concurrency model is that you have to resolve conflicts (which corrupts your work in progress) before you can commit your edits, whereas with git the workflow is commit first then resolve conflicts. git gives you a lot more safety than svn, and more flexibility and tooling for managing work in progress.
- keybored 3y agoHeh. I suspect that it might seem fine at first. Then some time passes and people end up wanting more fine-grained control over their local changes that upstream hasn’t accepted yet. Then they either start organizing branches on the upstream into their own namespaces (best case) or they start using (local) patch management systems on top of the centralized VCS (a worse case).
- CRConrad 3y ago> > “Dump the decentralized model” Not only that, but then followed it up with: > Pull Request as a first-class citizen. What on Earth for?!? If you only have a centralized repository, what else is there to pull from?
- egwynn 3y agoI know this isn’t truly the point of the article, but I’d encourage anyone/everyone to give https://fork.dev https://fork.dev a try. Unlimited free trial but well worth it to support the great devs. It solves basically all of the ergonomic gripes I have with the `git` CLI.
- deergomoo 3y agoI love Fork and use it a lot, though I’d say for any Git GUI you should still build a solid understanding of the fundamentals to use it effectively. I’m not implying this was the point you’re making at all, but imo a Git GUI should be for aiding visualisation and to avoid needing to type the (sometimes unintuitive) commands rather than to avoid learning Git itself. I think this is what causes many people to get stuck.
- computerdork 3y agoI know this has been tried many times, but really, there needs to be a wrapper on top of git that becomes the norm and is well supported: https://www.reddit.com/r/git/comments/pa656j/wrappers_on_top_of_git/ https://www.reddit.com/r/git/comments/pa656j/wrappers_on_top... Yeah, the problem is git is too low level for almost everything a dev does during the day. It really needs a tool on top of it that makes the simple tasks easy (and it must be possible, because Perforce is waay easier to use than git and works like a charm, at least in my opinion). ... but, at the same time, git is great for automation because the build-tool devs have some much control, so keep it as a foundation.
- joshka 3y ago> Alright, I want to move unstaged edits to a new branch. If the branch doesn't exist, I want to use checkout, but if it does exist I need to stash, checkout and then stash pop Use `git switch` instead. `git checkout` is known to be overloaded to do too many things. If it's a new branch, `git switch --create <branch>` If it's an existing branch and the changes would conflict, `git switch --merge <branch>`
- zodmaner 3y ago> Dump the decentralized model. ...and the author has lost me (I did read the entire post though). > If GitHub is down today I can't deploy anyway so I might as well embrace the server requirement as a perk. Just because you can't deploy doesn't mean others can't as well. (Also, GitHub != Git. Period.) Heck, the entire idea of DVCS is that you should be able to continue to work even after the servers are down. If you can't, then it's not Git problem. It seems that the author didn't even understand the concepts and ideas, or the rationals behind DVCS, let alone Git. As a someone who had lived through the period when SVN was the only game in town (and not wanting to return to those dark days), seeing the author pining for the "good 'ol days" of SVN-like, centralized VCS is just silly.
- keybored 3y agoYeah, the thing about us programmers is that we can build whatever stuff which is incompatible with the fundamental tool (centralized things vs. git(1)) on top of the tool and then complain that the tool has become useless. So it’s true that if you insist on having so much centralization that you become impotent once GitHub goes down, then yeah decentralization isn’t work for you—because you went out of your way to make it useless.
- CRConrad 3y agoThere's so much wrong with this that it's hard to see if there's anything at all right with it. > More specifically, it doesn't work offline. ??? Of fucking course it does! You mean Git Hub doesn't work offline, don't you? > It relies on merge controls that aren't even a part of git with Pull Requests. No, git doesn't "rely on merge controls that aren't even a part of git". Other things do. Things people nowadays confuse with git. People like, apparently, the author of TFA. (And no, the "F" doesn't stand for "fine" in this case.) > Dump the decentralized model. You can do that yourself: Just don't use it. > Move a lot of the work server-side and on-demand. Sure, just ssh into the server and run your search there. What's your problem? > Pull Request as a first-class citizen. A: Huh? But that's part of a decentralized workflow, and didn't you just say to "Dump the decentralized model"? Make up your mind. B: "git request-pull": https://git-scm.com/docs/git-request-pull https://git-scm.com/docs/git-request-pull > Why did SVN get dumped then? One word: branches. Yeah, that is a bit ironic... Seeing as how git's killer feature was branches, and for the last ten years (or how long has it been; at least five?) everyone has been pooh-poohing them and going on about their "linear commit history", as if that were somehow so fucking important. > I also think programmers love decentralized designs because it encourages the (somewhat) false hope of portability. Yes I am entirely reliant on GitHub actions, Pull Requests, GitHub access control Who told you to make yourself dependant on all that shit? I sure didn't, and I'm pretty sure git didn't either. Sounds -- again -- like your problem is with GitHub, not with git. > I could move the actual repo itself to a different provider. Your problem is probably that you think you need a "provider" in the first place. Just put a fucking ordinary git repo somewhere, and use that. Sheesh.