Most active commenters
  • maccard(10)
  • forrestthewoods(9)
  • crabbone(5)
  • diggan(5)
  • Izkata(3)
  • jayd16(3)

←back to thread

1062 points mixto | 73 comments | | HN request time: 0.003s | source | bottom
1. 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 #
2. 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 #
3. stephen_g ◴[] No.42942293[source]
I think it's probably the opposite, Git has amassed a lot of complexity because it's been adapted to being a tool that is able to can satisfy the majority of requirements.

I've never found that I need to touch most of it in the 15 or so years I've been using it, but it's there if your project needs it.

replies(2): >>42944590 #>>42945028 #
4. 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 #
5. beej71 ◴[] No.42942687[source]
With most of my guides I try to make it so you can quit reading when you feel you've read enough. No need to read the whole thing.

And on that note, I feel like the guide covers maybe 10% of Git :), but hopefully 90% of common usage.

replies(2): >>42943190 #>>42943834 #
6. forrestthewoods ◴[] No.42942689{3}[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 #
7. beej71 ◴[] No.42942795{4}[source]
Out of curiosity, what are the most common foot guns, in your opinion?
replies(5): >>42943049 #>>42943615 #>>42943616 #>>42945900 #>>42950081 #
8. lostdog ◴[] No.42943049{5}[source]
Messing up conflicts during a rebase, thinking I did it right, and then finalizing the rebase and losing work that accidentally disappeared. That's my most common mistake at least.
replies(1): >>42943282 #
9. djeastm ◴[] No.42943190[source]
>And on that note, I feel like the guide covers maybe 10% of Git

guh

I'm just going to be emailing myself versions of files with MyFile.Final.RealFinal2.txt from now on

replies(2): >>42943748 #>>42944062 #
10. rblatz ◴[] No.42943282{6}[source]
Find your last entry before the rebase using the reflog and reset your local branch to that entry.

The work isn’t lost, it is sitting right there.

replies(1): >>42945832 #
11. bb88 ◴[] No.42943615{5}[source]
Not realizing that git branches are cheap.

1. Create a branch from the intended destination.

2. Merge/rebase/whatever complex operation you need to do into that branch.

3. If successful merge this branch (fast forward merge) into the intended destination.

4. If unsuccessful delete the branch and start over at step 1.

12. forrestthewoods ◴[] No.42943616{5}[source]
Honestly? I’m not sure. Here’s the problem:

1. it’s possible to get into a bad state 2. it’s not clear what exactly that state is 3. it’s not clear how you got into that state 4. it’s not clear how to get out of it

I understand Git reasonably well. I know a good bit how it works under the hood. When I have a gitastrophe I rarely understand what I did wrong and how to avoid it in the future.

Here’s a recent post from a friend:

“ 0) clicked fetch all to make sure I had latest everything 1) right clicked on master and selected "merge master into branch" 2) made sure there were no merge errors 3) get on the master branch 4) clicked pull again because sometimes switching to branches doesn't work without it 5) right clicked on my branch and selected "merge branch into master" 6) clicked check in and push buttons

About an hour later, someone noticed that everyone's work from the past week was gone. I mean the checkins were still there in the graph, but all their code was basically gone in latest. And because my branch had many commits in it, apparently no one could just revert my merge and it took someone an hour to work out how to fix everything during which no one could touch git”

Somewhere along the way he didn’t do what he thought he did. No one could figure out what he actually did wrong. No lessons were learned from this Gitastrophe.

replies(2): >>42943804 #>>42944081 #
13. nomilk ◴[] No.42943687[source]
The guide is comprehensive, on the other extreme, this one-pager contains 90% of git commands you'll ever need: https://wizardzines.com/git-cheat-sheet.pdf
replies(1): >>42948797 #
14. Izkata ◴[] No.42943748{3}[source]
Skimming over it, it looks like it's just been expanded out way more than what most guides would do. Like other guides would use a paragraph or two for what this one has spread over several sections with extra examples.
15. Izkata ◴[] No.42943804{6}[source]
Well first, that's not git, that's some other GUI giving its own interface to git. The majority of the time my co-workers have a git problem, it's because their GUI tool has done something weird without telling them exactly what it did - one of theirs has a "Sync Branch" button which he'd click on whenever the IDE highlighted it, and I have no idea what that's even supposed to do, but I think it was some sort of rebase.

Without knowing for sure what was going on and whether your friend was describing it using the right verbs, I'm thinking (0) didn't pull in the changes ("fetch" instead of "pull") so (1) didn't merge in any new commits, but (4) did advance master, causing it to diverge from what was on the server. Then (6) probably decided to be helpful and did a force-push instead of a regular push so it wouldn't fail on the user. That would cause the server to have your friend's changes, but be missing anything that had been pushed to master after they started working on their branch.

replies(1): >>42950713 #
16. babuloseo ◴[] No.42943834[source]
can I repost this on leddit
17. gitgood ◴[] No.42944069{4}[source]
You're welcome to switch back to CVS or RCS at any time. You're also welcome to deal with their specific tradeoffs.
replies(2): >>42944517 #>>42945024 #
18. gitgood ◴[] No.42944081{6}[source]
You've just described computers. It's possible to get into a bad state because git can't read your mind, and, at the end of the day, it is incumbent upon you, the programmer, to make the computer do what you want. That is our responsibility as practitioners.

You need to think about what you're actually trying to accomplish, and that requires having a mental model of how the tool works. And no, I don't mean under the hood, I mean stuff like "what does a rebase do?" and "how do branches work?"

The Git Book is a great resource for this. I recommend reading it and trying the examples over and over until they stick. I promise, git is not inscrutable.

replies(3): >>42945800 #>>42949247 #>>42949260 #
19. zymhan ◴[] No.42944164{4}[source]
Please learn how to understand humor and sarcasm.
20. forrestthewoods ◴[] No.42944517{5}[source]
One of the modern curiosities is that people have somehow made using Git to be part of their identity. Dear HN user ‘gitgood’ who has a one hour old account, I suggest you take a step back and reevaluate things.
21. riffraff ◴[] No.42944590{3}[source]
Git was always confusing to use. There's a reason it has gained a "switch" command, and that's because the "checkout" command was confusing, while being there from the beginning.

Probably you've been using it for ten years or more at this point and have internalized it, but when it came out git felt way more confusing than other VCSs.

Compare git diff with hg diff for example.

replies(2): >>42947350 #>>42948892 #
22. sunshowers ◴[] No.42945024{5}[source]
Why not switch forward to Jujutsu? It's simpler and more powerful than Git.
replies(1): >>42945508 #
23. crabbone ◴[] No.42945028{3}[source]
Nope. It was initially built for the use-case most people will never have: multiple remotes that work on a project with multiple similar products each with its own set of differences from the others, with emphasis and dependency on Unix tools and text-only emails.

Most Git users will never have more than one remote per project, and so will only have a single product built from their source code. Probably wouldn't even know how to configure their mua to send text-only emails, in case that option is even available to them, and would struggle with basic Unix utilities like Vim and diff.

I don't know why Git won the VCS contest. But, I'm afraid, as with many such wins, there wasn't a clear rational reason why it should have won. It didn't make some of the obvious bad decisions which would disqualify it, but so did a few others. My take on this is that communication tools naturally gravitate towards monopoly, so, if one starts to win even slightly, the win will become a landslide win.

replies(3): >>42945780 #>>42948214 #>>42949213 #
24. crabbone ◴[] No.42945099{4}[source]
Why I agree with many points you make... let's keep Perforce out of it. The amount of damage that program done to my source code, and the amount of pain caused by it in daily use tells me that 10 minutes will not cut it.

Here's a simple example of how people shoot themselves in the foot with Perforce all the time: it makes files you edit read-only, and then you run with your pants on fire trying to figure out how to save your changes, because the system won't let you do that. And then you do something dumb, like copy the contents of the file you aren't able to save someplace else, and then try to incorporate those changes back once you've dealt with the file that Perforce wouldn't save. And then end up with a merge conflict just working with your one single change that you are trying to add to your branch.

I never regretted never having to touch Perforce ever again. Just no.

replies(2): >>42945814 #>>42945934 #
25. forrestthewoods ◴[] No.42945508{6}[source]
I've been using Jujutsu a little and over the weekend lost a bunch of files. I'd been working happily in an anonymous branch. I had a bunch of content in a thirdparty folder that was hidden by .gitignore. I couldn't figure out how to merge my anonymous branch into master. Somehow wound up on the old master and it deleted all of my gitignored files. Then jj status got totally fubar and couldn't complete in under 5 minutes because something something 7500 files (everything that got deleted, it was compiler toolchains).

It was a disaster. Literally the most important thing for any VCS tool is to never ever delete file I don't want deleted. No more Jujutsu for me.

Someday someone will invent a VCS tool that doesn't suck. Today is not that day.

replies(2): >>42949109 #>>42949345 #
26. maccard ◴[] No.42945780{4}[source]
> I don't know why Git won the VCS contest

Because GitHub offered free git hosting, and heroku came along and offered free hosting that was pretty much point and go.

Combined, you all of a sudden went from needing a sysadmin and two servers (this was pre containers), and the sysadmjn skills to operate SVN and your web app, to “it’s now free and it auto deploys when I commit”.

replies(1): >>42949173 #
27. maccard ◴[] No.42945800{7}[source]
And yet only git has these problems. I work with artists and designers - non technical people - all day. 10 minutes with p4v is all they need to be able to check in, update, roll back bad changes, and shelve to share with others, and even these people who manage to get their computers into the most unbelievable of states can do that without breaking their workspace and needing help.
28. maccard ◴[] No.42945814{5}[source]
Why does git get a free pass for shitty defaults but perforce doesn’t? Perforce long predates git, and the checkout operation (which can be done on save with any modern editor) fixes that immediately.
replies(1): >>42949288 #
29. maccard ◴[] No.42945832{7}[source]
> Find your last entry before the rebase using the reflog and reset your local branch to that entry.

You shouldn’t ever need to go to the reflog unless you’re in an exceptional case, and fit makes it very very easy to get into that exceptional case.

replies(1): >>42948685 #
30. maccard ◴[] No.42945900{5}[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 #
31. forrestthewoods ◴[] No.42945934{5}[source]
You could have marked the file as not read-only and later reconciled. Or you could have checked the file out of Perforce. You would have had a merge conflict either way.

I mean I haven't even talked about how Git can't handle large files. And no Git LFS doesn't count. And Git doesn't even pretend to have a solution to file locking.

I'm not saying Perforce is perfect. There's numerous things Git does better. But Perforce is exceedingly simple to teach someone. And it doesn't require a 193 page guide. I can teach artists and designers how to use Perforce and not lose their work. A senior engineer who is a Git expert can still shoot themselves in the foot and get into really nasty situations they may or may not be able to get out of.

There's a reason that like 105% of AAA game dev uses Perforce.

replies(2): >>42946100 #>>42949455 #
32. crabbone ◴[] No.42946100{6}[source]
So, there's a difference between how problems are common, how many of them are there, and how hard it is to deal with them.

So, is it possible to deal with Perforce marking files read-only? -- Yes. And it's not complicated, but the whole idea that that how the system should work is stupid. The problem is, however, exceptionally common. In my days working with Perforce there hadn't been a day when this problem didn't rear its ugly head.

So, maybe Perforce is scoring better on some metric, but in the day-to-day it generates so much hatred towards itself that I don't care if it can handle big files better than Git does. I only need to handle big files maybe a few times a year. And I prefer to get frustrated only twice or three times a year than to be fuming every time I have to touch files in my project.

replies(1): >>42946354 #
33. forrestthewoods ◴[] No.42946354{7}[source]
I appreciate your hatred of Perforce. But I think you've let your hatred blind yourself to the argument I actually made. In my original comment I made two arguments:

1. Git is complicated 2. Perforce is so simple to use that I can teach an artist or designer who has never even heard of source control how to use it in 10 minutes.

Then you came in and said the way Perforce handles read-only files is stupid. You know what, I agree! That's a solvable problem. If Perforce wasn't acquired by a private equity firm maybe they'd actually work to make it better. Alas.

This isn't about Git vs Perforce. I post in all of these Git HN threads because I desperately want people to realize that Git sucks ass and is actually really bad. WE COULD HAVE SOURCE CONTROL THAT DOESN'T SUCK. IT'S POSSIBLE. I'm not saying that Perforce is that solution. I'm saying that Mercurial and Perforce are existence proofs that certain things are possible. Source control doesn't have to be complicated! It doesn't have to have footguns! It doesn't need a 189 page guide!

replies(1): >>42949167 #
34. account42 ◴[] No.42947350{4}[source]
I've never been confused by git checkout. git checkout <branch> switches to a branch. git checkout <commit> switches to a commit in a detached head state. git checkout <file> switches just the content of a file. You can also combine these ofc but it all works pretty much as expected. The -b switch for creating new branches is someting you need to look up once and then just remember - and it does make sense - you are switching to a new branch.
replies(1): >>42954330 #
35. stcroixx ◴[] No.42948214{4}[source]
Spot on. I think it won because of who created it. I love linux and have been a daily user for like 25 years, but that doesn't mean I'm going to have a positive bias towards new tools or projects Linus makes like git. I think had some no name developed this it would have been laughed at by the majority of devs because, as you say, it's target use case is very specific and rare making it the wrong tool for most of us. Might have the worst interface I've ever seen. Before using it, I spent close to zero time thinking about version control and didn't need to understand anything about it's internals and had zero problems in the software dev lifecycle. Now, people are proud to waste time learning implementation details of their version control tool?
36. stcroixx ◴[] No.42948250{3}[source]
I was a developer for a long time before git and used many different VC systems. Didn't need to read the book on any of them and had no problems. For most cases, VC is simple. Git is just designed for this complicated case that applies to a tiny sliver of developers. I've never once pushed to more than one remote in like 10-15 years of using it.
37. diggan ◴[] No.42948670{6}[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 #
38. diggan ◴[] No.42948685{8}[source]
> You shouldn’t ever need to go to the reflog unless you’re in an exceptional case

If "loosing your work and it's not in the git log" isn't an exceptional case, what exactly is a "exceptional case"?

replies(1): >>42950649 #
39. imcritic ◴[] No.42948797[source]
It is quite bad and uninformative, you better not spread it.
replies(2): >>42948838 #>>42953371 #
40. nomilk ◴[] No.42948838{3}[source]
I really like it. Which bits do you dislike?
41. imcritic ◴[] No.42948892{4}[source]
Git is wrong in some regards: they introduce an entity "branch", but it is not stored properly, it's like virtual data.

The proof that there are really no branches in git's storage is a simple task that's not achievable in git:

suppose you had some branch, but you don't remember it's name, then you branched off and issued some commits. Now there's no way to get a git history consisting of just the commits introduced since you branched off.

42. necauqua ◴[] No.42949109{7}[source]
While I understand your predicament, consider not giving up on jj just yet because of this.

It is _exceedingly_ hard to lose files in jj, it's actually emotionally frustrating reading the line "most important thing [..] is to never ever delete file" because that's the whole shtick in jj with the oplog and whatnot - so something like nuking secrets completely from a jj repo is a bit of a chore.

Can you file a bug at least? A repro of some sort?. Or at least show us what is it what you did, `jj op log` might be enough to deduce what happened.

Also check out `jj op log -p`, your files might very well be in history, especially if, as you said, jj status took a long time (presumably snapshotting those files that got lost)

replies(1): >>42968132 #
43. crabbone ◴[] No.42949167{8}[source]
To teach someone to use something, in my mind, means that that someone should be able to use whatever they were taught.

After 10 minutes, the person unfamiliar with Perforce, will not know how to deal with read-only files. No chance of that happening.

replies(1): >>42951066 #
44. crabbone ◴[] No.42949173{5}[source]
Bitbucket offered free Mercurial hosting before GitHub even existed, if memory serves. And it's all but dead.

And, I don't know if GitHub succeeded because of Git or the other way around.

replies(2): >>42950914 #>>42955314 #
45. chuckadams ◴[] No.42949213{4}[source]
> I don't know why Git won the VCS contest.

Because Mercurial was dreadfully slow at the time for anything as big as the Linux kernel tree. Linus also put his thumb on the scale because he was the author and still the primary maintainer of git at the time, so he could bend it to whatever shape he wanted without needing to ask anyone else. Not really a knock on Linus, I'd do the same in his position, but it does explain much of its advantage.

46. ◴[] No.42949247{7}[source]
47. chuckadams ◴[] No.42949260{7}[source]
I appreciate that you are at least honest enough to name your shill account for what it is.
48. jayd16 ◴[] No.42949288{6}[source]
Have you actually used P4 in anger?

Having to add P4 support to any script, sucks. Having to do a network operation when touching files, sucks. Many many many apps have no idea what p4 is and will never get p4 support.

Git gets out of the way.

replies(1): >>42950615 #
49. martinvonz ◴[] No.42949345{7}[source]
When updating the working copy from one commit to another, I didn't think we would delete files that were not untracked in the first commit. I suspect the files are actually still available in the repo, but we'd appreciate a bug report if you can reproduce the problem.

The other issue you ran into with ignored files becoming tracked is a known limitation. I agree that it's really annoying. We have talked about it many times before but we didn't have a proper issue for tracking it, so I created one now: https://github.com/jj-vcs/jj/issues/5596

50. jayd16 ◴[] No.42949455{6}[source]
Why doesn't LFS count? It handles locking just as well as p4, too.

A good git gui works as well as p4v (and usually far less buggy).

The major difference in my eyes is that p4 can enforce more settings from the server. It's easier to get artists set up in p4 than git.

> There's a reason that like 105% of AAA game dev uses Perforce.

Irony of ironies, Unreal is distributed with git but largely uses p4.

P4 is dominant but I feel like a lot of that is momentum. Making a Unity game with git is pretty easy. Some Unreal tooling is built around p4 only but not really for any technical reasons.

replies(1): >>42949799 #
51. m_niedoba ◴[] No.42949799{7}[source]
There are Git-based solutions for that. One of them is Anchorpoint, which is basically a centralized layer on top of Git for file locking.

File locking is one of the reasons why vanilla Git is not that popular in game dev. It only exists with Git LFS and it is not really easy to use or reliable.

52. Pxtl ◴[] No.42950081{5}[source]
offhand:

1) The fact that "fetch" doesn't happen automatically in the "chrome" commands.

2) naive use of "git merge" results in history that's a cyclopean horror. For example, caring about the "left" and "right" parents of a commit.

3) rerere isn't enabled by default so if you're merging from upstream constantly you're having to re-resolve same conflicts, every time is an opportunity to screw up.

4) a culture of keeping a clean history but cleaning history is destructive and painful for other users of the same branch.

5) git merge merges from local (stale) branch by default, so when merging from upstream to get new commits you have to remember to `git merge origin/main` instead of `git merge main`. Also see (1).

6) using submodules. At all.

53. maccard ◴[] No.42950615{7}[source]
> Have you actually used P4 in anger?

Yes. I use it every day. I've ran P4 servers that serve hundreds of GBs per day globally with both commit edges and regular proxies. I've written batch scripts, bash scripts, and tooling in python, go and C# around it.

> Having to add P4 support to any script, sucks.

I disagree. It's no worse than adding git support to something. p4 zTag isn't the most elegant thing, but it works.

> Having to do a network operation when touching files, sucks.

Does it? Is it any worse than having to keep the entire history of every file locally on your machine, including any "large files?" And git-lfs as a solution to that means you're now coupled to wherever those files are stored. Making large submits to P4 isn't the nicest experience, but it sure beats paying that price every time you clone a repo IMO.

> Many many many apps have no idea what p4 is and will never get p4 support

In the same way that many people in this thread are blaming a git gui for a problem, "that's not P4's fault". I do agree it's shit though.

> Git gets out of the way.

Until it doesn't.

replies(1): >>42954173 #
54. maccard ◴[] No.42950649{9}[source]
> If "loosing your work and it's not in the git log" isn't an exceptional case, what exactly is a "exceptional case"?

Losing your work should be exceptional. It's very, very easy to fuck a rebase up, and rebasing is (like it or lump it) a common operation. You shouldn't one step away from an exceptional case from a daily operation.

replies(2): >>42950908 #>>42975853 #
55. Izkata ◴[] No.42950713{7}[source]
That (4) in my comment was supposed to be (5), way too late to fix now.
56. maccard ◴[] No.42950780{7}[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 #
57. diggan ◴[] No.42950908{10}[source]
Powerful tools have powerful consequences, case in point: with `rm` you're always one mistake away from blowing away large parts of your work.
58. maccard ◴[] No.42950914{6}[source]
This war was over around about the time I started, but my take on it is that it's all a bit intermixed and Mercurial lost because bitbucket caved and did git hosting [2], but git won beacuse of github and heroku [1][2]

[1] https://www.koyeb.com/blog/herokus-free-tier-legacy-the-shou... [2] https://blog.gitbutler.com/why-github-actually-won/

59. diggan ◴[] No.42950949{8}[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 #
60. forrestthewoods ◴[] No.42951066{9}[source]
I wish you didn’t ignore the majority of my comment to focus on one tiny part. :(

But yes it does literally include that. Perforce is THE standard tool for gamedevs. It’s not hard.

61. maccard ◴[] No.42951965{9}[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 #
62. capitainenemo ◴[] No.42952076{10}[source]
My favourite rant on this subject. https://www.bitquabit.com/post/unorthodocs-abandon-your-dvcs...

Now svn does have things I miss from the Mercurial world.. grep --all, fa --deleted, revsets, phases.. some could be implemented serverside in svn, but svn dev lost a lot of momentum post-DVCS (git esp).

But DVCS has issues that aren't an issue in svn land. History consistency, simple reliable narrow/shallow, people can work on files independently without syncing. (and a significantly more complex dvcs process)

63. mbonnet ◴[] No.42952448[source]
git can suck, but it's the best tool we've got for the job.
64. diggan ◴[] No.42952543{10}[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 #
65. CamperBob2 ◴[] No.42953227{3}[source]
No. Git is a complex program but version control is an inherently complex problem that requires powerful tools.

That's the thing. For most developers, it's not, and it doesn't. I have never needed a VCS that couldn't be wrapped in a few batch files like add.bat, get.bat, put.bat, diff.bat, merge.bat, and list.bat. You can do the same thing with git, of course, but just understanding enough about it to write the batch files practically takes a semester of study.

Unless your job is to maintain the Linux kernel, git is probably not the right tool for your job. But it 'won the source control war', so... git, it is.

66. forrestthewoods ◴[] No.42953245{11}[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

67. nix0n ◴[] No.42953371{3}[source]
They're probably best in combination, since Beej explains the concepts and Julia helps you type the commands.
68. jayd16 ◴[] No.42954173{8}[source]
The point is you don't need to add git support.

Yes, network traffic does suck more than spending extra disk space, especially when you need multiple workspace because P4 sucks at switching anyway.

I don't understand what you mean about cloning. If you set up LFS properly it's not much worse than a fresh P4 pull.

69. riffraff ◴[] No.42954330{5}[source]
I've dealt with people who are new to git and the fact that "git checkout X" does one thing or another based on what X is, was confusing for them, even if I could find an explanation for it. If you didn't have the same experience, good for you!

But compare "git switch X" and "git restore X". This makes different things look different, and obvious, which is usually a valuable thing when learning a new tool.

70. pseudalopex ◴[] No.42955314{6}[source]
Bitbucket and GitHub started around the same time. GitHub executed better. And the Ruby community adopted GitHub early. Comparisons around 2010 said GitHub's UX and network effects were top reasons to choose Git. Mercurial's UX and much better Windows support were top reasons to choose Mercurial.
71. forrestthewoods ◴[] No.42968132{8}[source]
Sadly in a fit of rage I nuked my .jj folder and went pure Git. I figure the files weren’t deleted, but they were easy to re-deploy. Also the jj command it self hung and I probably made things even worse and more corrupted by killing the process. It was a hot mess for sure!
72. _proofs ◴[] No.42975811{6}[source]
this does not sound like a problem with git, but a problem with culture and developer practices, and bad workflows.

in my 8 years of using git as a primary tool for vc, i have not once run into confusion on how to switch branches, create branches, prune branches, sync remotes with locals, and other common workflows.

does that mean i have only dealt with simple merges or haven't fucked something up bc i did not understand something and made things way harder than necessary (merging/replaying 50 commits vs squash rebase workflows, for example).

and no, you don't need to 'fetch' before you switch, fetching is only relevant if you're needing to bring in remotes or you're preparing for merges etc.

someone committing bunk to a main branch or something considered a production branch is not a git problem -- that's just bad development practices, and the onus is on the developer there to not do that and to understand why it is bad.

as for your other complaints, these are much more easily managed when the developers are not just arbitrarily commiting to branches without any strategic thought, but to point out, a lot of those problems are solved via working with commit hashes and branching, assuming you have already plugged the leak that is committing breaking changes to a main branch.

why are breaking changes that are mega changes even making it through to main?

73. _proofs ◴[] No.42975853{10}[source]
this is solved by branching your feature again and rebasing from that or the feature original in case the rebase gets fucked.

you don't have to treat rebases or merges as this black hole of "i have no recourse for not getting it perfect the first time".