• 2 Posts
  • 70 Comments
Joined 1 year ago
cake
Cake day: June 12th, 2023

help-circle













  • Yeah, you’re right, technically it’s not a “diff”, it’s the changed files.

    I don’t think this technical detail has any consequences for the general mental model of Git though - as evidenced by the fact that I have been using Git for years without knowing this detail, and without any problems.


  • homoludens@feddit.detoProgramming@programming.devWhy Git is hard
    link
    fedilink
    arrow-up
    70
    arrow-down
    11
    ·
    edit-2
    8 months ago

    I disagree, hard.

    I disagree with the general conclusion - I think it’s very easy to understand*: each repo has a graph of commits. Each commit includes the diff and metadata (like parent commits). There is a difference between you repo seeing the state of another repo (fetch) and copying commits from another repo into your repo (merge; pull is just a combination of fetch and pull). Tags are pointers to specific commits, branches are pointers to specific commits that get updated when you add a child commit to this commit. That’s a rather small set of very clear concepts for such a complex problem.

    I also disagree with a lot of the reasoning. Like “If a commit has the same content but a different parent, it’s NOT the same commit” is not an “alien concept”. When I apply the same change to different parents, I end up with different versions. Which would be kinda bad for a Version Control System.

    “This in turn means that you need to be comfortable and fluent in a branching many-worlds cosmology” - yes, if you need to handle different versions, you need to switch between them. That’s the complexity of what you’re doing, not the tool. And I like that Git is not trying to hide things that I need to know to understand what’s happening.

    “distinguish between changes and snapshots that have the same intent and content but which are completely non-interchangeable and imply entirely different flows of historical events” How do you even end up in a situation like that? Anyway, sounds like you should be able to merge them without conflicts, if they are in fact completely interchangeable?

    “The natural mental model is that names denote global identity.” Why should another repo care, which names I use? How would you even synchronize naming across different repos without adding complexity, e.g. if two devs created a branch “experimental” or “playground”. Why on earth should they be treated as the same branch?

    “Git uses the cached remote content, but that’s likely out of date” I actually agree that this can lead to some errors and confusion. But automation exists - you can just fetch every x minutes.

    “Branches aren’t quite branches, they’re more like little bookmark go-karts.” A dev describing what basically is just a pointer in this way leads to the suspicion that it might not be Git’s mental model that is alien.

    “My favorite version of this is when the novice has followed someone’s dodgy advice to set pull.rebase = true” Maybe don’t do stupid stuff you don’t understand? We know what fetch is, we know what merge is. Pull is basically fetch & merge.

    ““Pull” presents the illusion that you can just ask Git to make everything okay for you” Just… what? The rest of the sentence doesn’t really fix this error in expectations.

    • except the CLI of course, but I can use GUI-tools for most tasks


  • As I said, it depends on a lot of definitions of rather complex concepts.

    The point I was trying to make, was that you don’t have to end up with a state, especially not a soviet style state, after a revolution. And in my opinion a violent uprising or an having an organized militant group does not mean you have a state. If I understand it correctly, the Zapatistas don’t have a principle of using violence to force others into their system - which is something central to states.




  • There are different ideas how (and if) this could work. E.g. worker’s councils that form at a factory level (or similar - people who are working closely together), and then you might have higher levels of cooperation where e.g. all roadworking collectives in a region send delegates to coordinate who builds which road, what roads are even necessary etc. You’d probably want cooperation in another dimension as well: delegates of road working collectives coordinating with teamsters, urban planners, manufactureres of building materials, … But it would be networks of networks, not a top-down structure responsible for everything from kindergartens to space exploration and equipped with military and police power.

    You might want to check out The Disposessed by Ursula K. LeGuin or bolo’bolo by P.M. for some more ideas.