ethersync / ethersync

A system for editor-agnostic, real-time collaborative editing of local text files.
https://ethersync.github.io/ethersync/
GNU Affero General Public License v3.0
219 stars 9 forks source link

Dealing with SCM operations #80

Closed peacememories closed 2 months ago

peacememories commented 2 months ago

At my current workplace we use VSCode Live Share a lot to facilitate remote (and sometimes even local) pair programming.

While developing we do two things fairly frequently:

Live Share, by its nature, handles this fairly well because no files on the client have to be changed.

For ethersync I see a couple of potential issues with this workflow.

When committing on one machine you could either:

When rewriting and jumping around history, lots of the same issues apply. Additionally this can result in massive amounts of changes. We regularly use a custom command jj_run which goes through every commit in a chunk of history and runs a command (e.g. autoformatter).

I wonder if this workflow can be reconciled with how ethersync works. I would definitely love if we could manage that :sweat_smile:

blinry commented 2 months ago

When we "dogfeed" Ethersync ourselves, we are using the following workaround:

  1. One of the people in the session makes a commit, and pushes it.
  2. The other people run git fetch, and then ✨ git reset --mixed @{u} ✨ Which sets your current branch on the upstream commit, and also updates the index, without touching the files.

After that, both people are on the same commit, and the status for both of them is clean, which feels a bit like magic. :D

A better integration would be nice for sure, especially to allow people to change branches together. That's not our top priority right now, but I'd also love it to find good solutions there!

We decided we wanna try GitHub's "Discussions" feature, I'm moving this thread there for now! :)