logoalt Hacker News

henrydarktoday at 1:35 PM2 repliesview on HN

I now use syncthing for the .git directory, excluding HEAD file and a few others, between my few devices and a vps on hetzner.

Most of git is append only immutable blobs - just sharing these between devices just works for me. "users" and authentication is handled by syncthing.

I have pre and post hooks to make sure no device tries to change HEAD of branch owned by another device, just to be safe, be it hasn't been activated once yet.


Replies

j-bostoday at 1:41 PM

Super interesting, mind sharing your exclusions and hooks?

diathtoday at 1:39 PM

If you have a VPS that's always running, you can just use it as a git remote through SSH without moving things around or any third party software, just put the Git repo on the VPS and clone it via "git clone ssh://user@host/path". You get authentication, encryption and synchronization out of the box with just ssh/git.

show 1 reply