{"thread":{"id":"65706","subject":"Suggestion: Real-time or Conflict-Reducing Collaboration Support for Specific Directories","startedAt":"2026-05-28T05:15:58Z","lastAt":"2026-05-28T09:23:38Z","messageCount":2,"participants":["胡锦","Christian Couder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"544208","messageId":"tencent_530FD5EC0E2FA9A005AB4725@qq.com","threadId":"65706","inReplyTo":null,"subject":"Suggestion: Real-time or Conflict-Reducing Collaboration Support for Specific Directories","fromName":"胡锦","fromEmail":"hujin2@sunline.cn","sentAt":"2026-05-28T05:15:51Z","receivedAt":"2026-05-28T05:15:58Z","isPatch":false,"body":"Dear Git Team,\n\nMy name is Hujin, and I am an IT engineer from China. I have been using Git for more than 10 years.\n\nFirst of all, I would like to express my appreciation for Git. In my experience, Git remains one of the best and most reliable version control systems in modern software development. It has played an important role in many projects I have worked on.\n\nHowever, I have also encountered a recurring difficulty in daily use. For certain types of files, especially files under script directories or other frequently modified directories, conflicts happen quite often because updates are not synchronized in real time. In some project scenarios, multiple engineers may edit related scripts at the same time, and this can lead to repeated merge conflicts and extra coordination costs.\n\nI wonder whether Git could provide, in future versions, some optional features similar to online collaborative documents, or directory-level collaboration mechanisms for specific files or folders. For example, users could enable special real-time update, lock, notification, or conflict-reduction behavior for selected directories such as scripts. This could help reduce conflicts and make Git even more convenient for teams working on highly shared files.\n\nI understand that Git is designed as a distributed version control system, and such functionality may not be simple to implement. Still, I believe an optional feature in this direction could be very helpful for many engineering teams.\n\nThank you for your great work on Git. I look forward to hearing your thoughts.\n\nBest regards,Hujin"},{"id":"544223","messageId":"CAP8UFD1TyE6bx8uhJ-hZuSv5t6D7rwRZ8m448-rVepNnyN1=CA@mail.gmail.com","threadId":"65706","inReplyTo":"tencent_530FD5EC0E2FA9A005AB4725@qq.com","subject":"Re: Suggestion: Real-time or Conflict-Reducing Collaboration Support for Specific Directories","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2026-05-28T09:23:24Z","receivedAt":"2026-05-28T09:23:38Z","isPatch":false,"body":"Hi Hujin,\n\nOn Thu, May 28, 2026 at 7:16 AM 胡锦 <hujin2@sunline.cn> wrote:\n>\n> Dear Git Team,\n>\n> My name is Hujin, and I am an IT engineer from China. I have been using Git for more than 10 years.\n>\n> First of all, I would like to express my appreciation for Git. In my experience, Git remains one of the best and most reliable version control systems in modern software development. It has played an important role in many projects I have worked on.\n\nThanks.\n\n> However, I have also encountered a recurring difficulty in daily use. For certain types of files, especially files under script directories or other frequently modified directories, conflicts happen quite often because updates are not synchronized in real time. In some project scenarios, multiple engineers may edit related scripts at the same time, and this can lead to repeated merge conflicts and extra coordination costs.\n>\n> I wonder whether Git could provide, in future versions, some optional features similar to online collaborative documents, or directory-level collaboration mechanisms for specific files or folders. For example, users could enable special real-time update, lock, notification, or conflict-reduction behavior for selected directories such as scripts. This could help reduce conflicts and make Git even more convenient for teams working on highly shared files.\n>\n> I understand that Git is designed as a distributed version control system, and such functionality may not be simple to implement. Still, I believe an optional feature in this direction could be very helpful for many engineering teams.\n\nFirst I don't think it's Git's role to provide a full collaborative\neditor, but you are right that it could provide mechanisms that could\nhelp.\n\nThen there are a number of features/mechanisms that other SCMs or\ntools provide that could perhaps help:\n\n- Jujutsu's working copy as a commit\n(https://docs.jj-vcs.dev/latest/working-copy/)\n\nIt could help write a background script that constantly pushes and\nrebases the current commit to a shared server as the user types,\nmimicking a real-time sync.\n\nJujutsu's first-class conflicts could perhaps help too.\n\n- Pijul's CRDTs and the Theory of Patches (https://pijul.org/manual/theory.html)\n\nTo seamlessly merge real-time changes without locking the file or\nconstantly throwing conflict errors, modern collaborative editors\nabandon SCM snapshot merging entirely. Instead, they use one of two\nmathematical models:\n\n  - Operational Transformation (OT): Used by Google Docs.\n  - Conflict-free Replicated Data Types (CRDTs): Used by newer tools\nlike Figma, Zed, and Apple Notes.\n\nPijul's underlying Rust library (libpijul) which already uses CRDTs\ncould be wrapped and adapted to fit a real-time context.\n\n- Michael Haggerty’s `git-imerge`\n(https://softwareswirl.blogspot.com/2013/05/git-imerge-practical-introduction.html)\n\nI think this is the right way to simplify complex merges and rebases\nas much as possible, which is useful if a lot of such operations have\nto be made.\n\n- CRDT AST (https://github.com/aaronmunsters/AST_CRDT)\n\n- Automerge (https://automerge.org/docs/hello/)\n\n- Yjs (https://github.com/yjs/yjs)\n\nIt would be indeed complex to implement any of these in Git.\n\nThe nice thing if someone would want to implement backend\ncollaborative editing features is that these days an AI could perhaps\nresolve merge conflicts automatically. (But of course users should\nhave a way to override the AI's decisions if they think it's wrong.)\nThere are already a number of tools out there doing that for regular\ndevelopment.\n\nBest,\nChristian.\n"}]}