Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This. I'd like to sync my ~/development directory, including all the git directories, so I don't need to push and pull branches between machines. Is this at all feasible?


It works fine. I've been doing it for ages with no problems. Note that I added node_modules, etc. to the ignore file so that it's not always syncing thousands of tiny files, which always tend to take a long time for some reason.


Out of interest, what OS are you using? I'm wondering if some of the issues I've had in the past may have been macOS specific.

That said, I can't recall if I tried excluding node_modules when I last gave this a go. Maybe I'll try it again.


Yeah been trying to work that one out for years.

I've read of other HN'ers doing this successfully (syncing git repos between machines) but I just seem to get a lot of issues - git repos often broken temporarily, conflicts etc.


Don't know how Syncthing works, of it it would even work, but what if Syncthing would detect that it recurses into a .git folder, and then use git push to push all refs to the remote .git repo? That should give a transparent "sync" of the entire git repo and workdir for the user, but via the safety of git's own sync mechanism.




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

Search: