5 ms·
> I don't see any obvious flaws with Git. Merge conflicts.
by rhabarba 7y ago
> I don't see any obvious flaws with Git.
Merge conflicts.
- hn_acc_1 7y agoMerge conflicts are not so scary, and are an elegant way to handle distributed changes with simultaneous edits to a single file. If the conflict is huge, rebasing can help you by "playing" the commits from one branch one at a time so the conflicts are smaller / easier to fix. At a previous job, a team was forced to use checkout-style VCS due to their manager's unfounded fear of merge conflicts; I couldn't go in that office without hearing one developer shout to another: "Hey, can you finish up and check in that file so I can get started on my changes?"
- thenewnewguy 7y agoMerge conflicts are a part of any VCS that allows two people to edit the same file at the same time.
- HALtheWise 7y agoHowever, in some cases (like non-mergeable binary files), it is actually better to have a system that allows one user to take a lock on a file and have exclusive editing abilities. The git protocol has no support for those workflows, and so people end up using a Google Doc or something to track who is modifying what file. Definately a place for improvement.
- shakna 7y agoHow do you lock a file in a distributed system? Many people won't be online. Many people won't be on the exact same head.
- squiggleblaz 7y ago> Many people won't be on the exact same head. This consideration is actually irrelevant to locking non-mergeable binary files. It doesn't matter what branch we're on or where the file is located, only that you and I both want to edit the logo. Eventually, either your version must be based on mine, or mine based on yours, since they will be merged. So it's probably better not to have that file in Git, since it doesn't support the workflow around which Git is based. It's actually right to store your design documents in Google Docs or a wiki and your code in Git, rather than everything in Git. It is easy to have one filestore to rule them all and in the darkness bind them, but if you want to do different things with them, you have to do different things with them. I'm not sure that it's possible to unify text file and binary doc based workflows, but it seems we don't have to worry because users automatically use the best tool for the job and it's only hackers who tie themselves in knots trying to make git do everything.
- james_s_tayler 7y agoNo VCS will be merge conflict-less without locking files. I'd rather not lock files.
- deleted 7y ago[deleted]
- ben509 7y agoI'd rather lock files, but be able to unlock them, to be able to coordinate with others and proactively reduce merge conflicts.
- wyoung2 7y agoThe only way to make that simple is to centralize the version control system so that you can have a single arbiter of who has what locked. To add easy locking to Git, you'd have to turn it back into a non-distributed VCS. I don't think I need to sell the value of DVCS over VCS, but what seems to get lost is that buys you a certain amount of essential complexity, expressed in the CAP theorem and its consequences. We discussed this deeply on the Fossil forum: https://www.fossil-scm.org/forum/forumpost/2afc32b1ab https://www.fossil-scm.org/forum/forumpost/2afc32b1ab We came to no easy answers, because there aren't any. You only get a choice of which problems to accept.
- ben509 7y agoI'm talking about purely advisory locks. Accessing a locked file would let you know who locked it, and if you unlock it, it would just notify them. So it's just a communications mechanism in addition to regular merges. The alternate method is that locking a file marks you as an interested party to a merge, allowing you to review the correctness of a merge. This would be purely to avoid changes being lost during merges.
- jamil7 7y agoI've worked in teams where developers seemed terrified of merge conflicts, to the point of telling eachother not to edit a particular file which seems absurd. Maybe I don't know any better but they seem like part of life.
- int_19h 7y agoWhen at least one person is making changes that touch large parts of the file, it's very sensible to ask others to not touch it, if you don't want to spend hours merging it manually later.