Hacker News new | past | comments | ask | show | jobs | submit login

It’s not recommended to sync a git repo



I have heard that before, but no good reason why.

If a synchronization software can't handle a git repository, what else is it not able to handle? After all, a git repository is just a bunch of files and in my case not particular big once.


It’s a consistency problem. Syncthing provides reasonably solid single file consistency. Git repos and anything else that requires multi-file consistency is trickier, since Syncthing doesn’t know about the internal consistency requirements.

If you use Syncthing peer-to-peer and/or have concurrent modifications to different peers before a full sync, you can run into problems. It’s not really designed for that, it’s optimised from the single user sharing individual files on multiple devices case.

Doing anything better here is incredibly hard in a peer-to-peer system on the level of abstraction that Syncthing operates on.

I think renames might be/may have been problematic because it tries to be smart and handle them efficiently. If it did the naive thing of delete followed by creation, consistency would be better, but performance would be worse.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: