Ask HN: How do you sync your Git repos across machines at home?
11–20 of 21 posts
Re: Ask HN: How do you sync your Git repos across machines at home?
#12You already have everything you need to do this with just git. Just make a repo (might need to be a bare repo) on whatever machine you want to make the remote and then clone from it using ssh on the other machines. Then you can push and pull just as if the remote was in github or whatever. If you want more functionality than that, gitlab has a free tier that can be self-hosted. same with gittea.
`git config receive.denyCurrentBranch updateInstead`
Re: Ask HN: How do you sync your Git repos across machines at home?
#13Re: Ask HN: How do you sync your Git repos across machines at home?
#14Git is peer to peer, you can add an ssh remote that points to the directory containing the git repo on another machine. https://stackoverflow.com/questions/4131164/how-do-i-pull-fr...
Re: Ask HN: How do you sync your Git repos across machines at home?
#15I run a self hosted gogs instance. Centralized storage is much easier to backup.
Re: Ask HN: How do you sync your Git repos across machines at home?
#16I have my git repos in one folder ~/git and then use syncthing to sync across all machines. It works great, I can start doing changes on one machine and then pick up the work on another machine without interruption
Re: Ask HN: How do you sync your Git repos across machines at home?
#17I use tailscale to access my machines around the world. It's secure and private. Nobody on the internet knows about this machines, even though they are servers. Easy to configure
Re: Ask HN: How do you sync your Git repos across machines at home?
#18You can setup glusterfs incredibly easily. When you write to one dir it’ll auto replicate to N machines. Did this over the weekend and it took me no time at all. Support is realistically Linux only IIRC with some MacFuse stuff for OSX
Re: Ask HN: How do you sync your Git repos across machines at home?
#19A bare repo on a server, which I `got push` to and `git pull` from.
I also realize there's Amazon CodeCommit, interesting.
Re: Ask HN: How do you sync your Git repos across machines at home?
#20I have my own forgejo instance