Comment by hardwaregeek
4 years ago
There seem to be a few projects that try to be a live, collaborative git. Perhaps it’s just me, but I don’t necessarily think I’d want this for my main system. Maybe a short term collaboration/pair programming session, but not in general. I like how git is not immediate. I like that I can take time before sharing my code to clean it up. The issues that a tool like this purports to solve are not issues to me. Live collaboration is a great idea, but maybe not as a version control system. But hey if other people get use out of it, why not!
What I always wanted to have is a tool that syncs my uncommitted changes of git repos between all my devices. So that I can switch from the desktop to the laptop without committing, pushing and pulling. Right where I stopped. Also sync not yet pushed commits, I may want to rebase/edit before pushing.
This was exactly my use case for building gut, https://github.com/tillberg/gut. It's a daemon that wraps git, auto-committing changes for a tree and bidirectionally syncing them between N computers. The wrapped git is autorenamed from git to gut so that it can commit git folders. The gut tools are usable for exploring/manipulating history of this meta-repo, too. I saved myself from disaster a couple times with `gut checkout ...`.
Nowadays I use Syncthing for the same purpose (I learned about Syncthing when I did a Show HN for gut). Dropbox works reasonably well, too.
Yes! This is something they Facebook’s version of Mercurial implements. It’s called Commit Cloud [0]
- [0] https://engineering.fb.com/2022/11/15/open-source/sapling-so...
> What I always wanted to have is a tool that syncs my uncommitted changes of git repos between all my devices.
can't git do this with a fork, and you put all your devices on the fork, then merge the fork when you're ready?
Sure, but then I would need to fork all repos I work on. Also you still would need to commit and push it somewhere.
It’s possible, but it’s some steps you need to take. You can’t just get up from your pc, take your laptop and start working.
Local changes in gut feel like in the pre-Dropbox era, something you need to copy on your own.
By uncommitted changes do you mean edited files? Then something like syncthing or anything functionally similar to Dropbox.
100x yes. I agree with parent that pushing live changes is way to intrusive, but a synced working/staging directory could be incredibly helpful.
I don’t see any fundamental reason why git or, even 3p tooling for git, couldn’t support this use case using something like private, ephemeral, auto-synced branches.
Here's the roundabout way I sync uncommitted changes. Push everything to a new tmp branch. Then on the other system, fetch and cherry-pick the last commit id, then reset HEAD~1. Boom uncommitted changes synced.
Appreciate the feedback! Will keep this use case in mind, this could definitely work as a layer on top of Git when people need to pair program or preview code.
This may also be the reason why Google Wave failed.
Google Wave primarily failed because:
1. Performance was never more than tolerable
2. Invite only access
3. Invites didn't go out immediately, just added people to a pool of potential future invites
A product that required the network effect of a large connected userbase to succeed only had random individuals with access. Literally no one I invited and would have used it with got in, and I was in one of the first couple batches of public users to get access. A spectacular self-own on Google's part with that rollout.
I never understood the real use case of Google wave.it had lots of features without a clear goal. Google docs seemed enough for all those but the curious.
I'm not sure that's the main reason, look at Microsoft Teams. It hasn't failed but..