←back to thread

1062 points mixto | 2 comments | | HN request time: 0s | source
Show context
dijit ◴[] No.42941702[source]
Well, what's terrifying is that the guide is so long.

I am aware that beej's guides are typically quite comprehensive, but the vast nuances of git truly eluded me until this.

I guess Jujitsu would wind up being a much slimmer guide, or at least one that would be discoverable largely by humans?

replies(3): >>42942124 #>>42942687 #>>42943687 #
vvpan ◴[] No.42942124[source]
It tells me that git is the wrong tool for the majority of people but it just happened to stick.
replies(3): >>42942293 #>>42942401 #>>42952448 #
Barrin92 ◴[] No.42942401[source]
No. Git is a complex program but version control is an inherently complex problem that requires powerful tools. There's certain set of problems where, as a programmer, you're going to have to sit down and actually read the book.

The universe doesn't owe you an easy 10 minute video solution to everything, it's an annoying educational expectation that people seem to have developed. Some things are just that difficult and you have to learn them regardless.

replies(3): >>42942689 #>>42948250 #>>42953227 #
forrestthewoods ◴[] No.42942689[source]
No. Source control is not that complicated. Git is just bad. As an existence proof: Mercurial is much better and simpler.

I can teach someone who has never even heard of source control how to use Perforce in about 10 minutes. They will never shoot themselves in the foot and they will never lose work. There are certainly more advanced techniques that require additional training. But the basics are very easy.

Git makes even basic things difficult. And allows even experts to shoot their face off with a rocket launcher.

Git sucks. The best tool doesn't always win. If MercurialHub had been founded instead of GitHub we'd all be used a different tool. Alas.

replies(3): >>42942795 #>>42944069 #>>42945099 #
beej71 ◴[] No.42942795[source]
Out of curiosity, what are the most common foot guns, in your opinion?
replies(5): >>42943049 #>>42943615 #>>42943616 #>>42945900 #>>42950081 #
maccard ◴[] No.42945900[source]
How do switch to a branch? (Note that you need to fetch before you switch. Also switch is experimental but it’s not really)

How do I undo a change and get it to other people on the team?

- follow up, What happens if someone has made an unrelaydx change since?

- someone has committed an enormous change and I want the commit immediately after it but the enormous change doesn’t affect me. How do I get that single file without needing the mega change.

- someone has committed a mega change and pushed it to main, and it’s busted. How do I put my perfectly functioning feature in while i wait for the west coast to wake up and fix it?

I don’t need an explanation on how to solve these issues, I am perfectly able to. But these are daily workflow issues that hit requires you to use external tools, and change entire development processes to work around. And trying to skirt them is a guaranteed one way ticket to a busted workspace

replies(2): >>42948670 #>>42975811 #
diggan ◴[] No.42948670[source]
I'm aware of how to do most of those things in git, but that probably says more about me than git.

What I'm curious about though, since I basically entered the software developer workforce just as Git became mainstream and GitHub became popular, how would you do those things with the alternatives at the time; SVN, Mercurial, Perforce and the rest? Would it be easier or harder? Would it work better/worse in a sync/async context, without centralized servers?

There are lots of people complaining about how needlessly complicated git is, but they almost always fail to put forward some simpler alternative that can handle the same things. Is git actually accidentally complicated or purposefully complicated because the topic at hand is kind of complicated?

replies(1): >>42950780 #
maccard ◴[] No.42950780[source]
> without centralized servers?

Git is complicated _beacuse_ of this. The defaults are tuned for this. But, most people don't need this. I'm sure there are people out there who set an upstream to their coworkers PC and clone a branch from them, merge it with their work and then someone else takes that and is saved a bunch of work because the commits all line up, but for every 1 of those people there are probably 100,000 who push and pull to a centralized forge, and pay the complexity cost for the distributed workflow.

> but they almost always fail to put forward some simpler alternative that can handle the same things. Is git actually accidentally complicated or purposefully complicated because the topic at hand is kind of complicated?

Git is complicated because it's got poor defaults, an unintuitive cli, and is designed for distributed workflows (I've never worked anywhere that has used a distributed workflow, fwiw). I can sit someone down with perforce for 15 minutes and basically never have to interact with them on it again. It's _so_ much simpler - because it's centralized. It has some baggage, is definitely not perfect (and it costs an absolute bomb). Mercurial is another example of something that is much, much easier to use and work with. I wish mercurial won, honestly.

replies(1): >>42950949 #
diggan ◴[] No.42950949[source]
> Git is complicated _beacuse_ of this

Right, but since git specifically was made for usage without decentralized servers, that complexity isn't accidental, it's purposeful as without serving that particular use case, git isn't really git anymore. Most design decisions in git comes from having to serve that use case, for better or worse.

> . It's _so_ much simpler - because it's centralized

Right, but that's also a poor comparison. A bit like saying that `mv` is much simpler than `rsync` because `mv` always move files locally. Yeah, that's true, but the entire point of `rsync` is to do remote sends/receives, so compared it to something that cannot, kind of ruins the comparison.

replies(1): >>42951965 #
maccard ◴[] No.42951965[source]
You’re looking for someone to suggest an alternative to a DVCS - git is the winner in that category. But if you go one step backwards and ask “do you really need distributed”, the answer for the vast, vast, vast majority of people is no, for the vast vast majority of use cases. To use your analogy it’s as if we all used rsync because it’s the best remote file management tool, but we use it locally because everyone else uses it.
replies(2): >>42952076 #>>42952543 #
1. diggan ◴[] No.42952543[source]
> the answer for the vast, vast, vast majority of people is no, for the vast vast majority of use cases.

With GitHub being the top platform for sharing source code and as the top choice for the basket of all our eggs, I'd wager we need DVCSs more than people need or appreciate today. And that's just considering how often GitHub is down today.

If we start to emphasize with people who have really shitty internet connections (which is a larger part of the world than you seem to think), we can start to understand why it's really useful to be able to share our code with our co-workers on our local network without having to rely on terrible, minimum 5s latency connections to US companies who basically don't care about you.

replies(1): >>42953245 #
2. forrestthewoods ◴[] No.42953245[source]
Nah. GitHub is evidence that 99.999% of projects are defacto centralized. The D is DVCS is useless to approximately all projects not Linux.

Note: centralized does not mean you can’t work in offline mode or share basic deltas