Live data from Hacker News

Git is too hard

changelog.com

811–820 of 821 posts

Re: Git is too hard

#811

Earlier quoted context omitted.

It's ok, I'm not really convinced the poster above you actually understands how distributed systems work. They seem entirely stuck in the assumption that there's a more powerful entity in the relationship that can arbitrate interactions between individuals.

Technically, I think their problem is assuming that it's acceptable for there to be such a entity, not that one necessarily exists. And then misinterpreting/misrepresenting git's semi-intentional exclusion of such a entity as a bug when in fact it's a feature.

I'm not sure that that such an entity is truly necessary to get a lot of the functionality. However, in the case of git, I'd guess 95% or more of users in effect do have a such an entity. Github is $7.5 billion worth of proof that most people are cool with effectively centralized source code management.

Re: Git is too hard

#812

Earlier quoted context omitted.

I think more than one thing can be a problem. The CLI is confusing and the model is complicated. This means people can get themselves into weird, hard-to-debug situations. Or end up copy-pasting incantations in hopes of fixing problems, but instead might lose their work.

I've never seen a scenario that resulted in a developer losing work. You can always retrieve things out of the commit history, even in pathological situations.

I have lost work. A colleague force-pushed something because he thought he understood Git well enough to get away with it.

Re: Git is too hard

#813

Earlier quoted context omitted.

I would also love to get some recommendation on git. I'm using the github desktop gui atm (very new to this world), but I'd like to start learning git. it is kinda intimidating.

If you're more about learning by trying things out, I enjoyed these two: https://learngitbranching.js.org/ (which presents a visualisation of the commit history) https://github.com/Gazler/githug (nice for small exercises; although you kinda have to pay attention and not just 'game' your way through it).

these are all really great. thanks everyone!

Re: Git is too hard

#815

Earlier quoted context omitted.

I've never seen a scenario that resulted in a developer losing work. You can always retrieve things out of the commit history, even in pathological situations.

I have lost work. A colleague force-pushed something because he thought he understood Git well enough to get away with it.

If you can find your prior branch head with git reflog, you can assign a new branch name to it and push it.

Then go back to your force-pushing colleague and tell him to resolve the merge conflict he created by thinking he was too clever.

Re: Git is too hard

#816

Earlier quoted context omitted.

I have lost work. A colleague force-pushed something because he thought he understood Git well enough to get away with it.

If you can find your prior branch head with git reflog, you can assign a new branch name to it and push it. Then go back to your force-pushing colleague and tell him to resolve the merge conflict he created by thinking he was too clever.

The command "git log --all --oneline --graph --reflog" will give you an exhaustive listing of the commit graph in your local repo.

Examine the output of that command in detail before declaring your work to be lost.

Re: Git is too hard

#817

Git is as hard as you make it. It's a bit like raising kids. You don't bash them with the intricate model of the world that you have developed at an age when they are not ready for it. The police are the good guys, the criminals are the bad guys. Sure, there are places where it's the other way around, but you don't really go about telling them about corrupt police departments or authoritarian governments when they ar…

That is funny because I read that developers tend to behave as specialists of everything (here raising kids). And that is also sad because looks like a narrow minded point of view

Software engineering basically selects for people being able and willing to sift through vast amounts of information and rapidly build intricate mental models in order to figure out how some system works or ought to be working. That's basically the job description.

And it's not just software engineers who tend to be 'know-it-alls'. Just spend some time on Quora.

The part about kids is a bit uncalled for though. Anyone raising kids should strive to be a specialist at raising kids, don't you think?

Re: Git is too hard

#818

The article is about GitHub writing a new porcelain in Go that matches GitHub's semantics better. And I think that's the key point: the main git porcelain was hacked together by the Linux kernel team to match their workflow. Now, I have strong disagreements with GitHub's semantics. I want code reviews to be per commit, not per branch, and I want an easy way to stack up a bunch of commits, make changes each of them as…

So a lot of people at my company were struggling with this too, but I think we found a pretty good solution! We found a tool called ghstack (https://github.com/ezyang/ghstack) that makes it easy to manage dependent PRs. A lot of us are now using it.

Happy to show you how to use it - just book some time here: https://calendly.com/ericyu3/15min

Re: Git is too hard

#819

I've used git for ten years, at half a dozen organizations (I'm a consultant/contractor). I have accepted that it's what we use now, so I use it. But... Git is the bad boyfriend of the developer community. If anything bad happens it was your fault. If you ask it to do something and it does something else, it was your fault, and also you are stupid. If you ever make a mistake, you will be punished for it with a long d…

> Good software is not like that You can't just say this without providing an example of what you think is good software, as, after all, good and bad are subjective and not agreed upon by all people for all things, as evidenced in this thread.

Mercurial, Pijul, Bazaar, Subversion

In fact, it's every fucking version control system other than Git.

Post reply on HN