logoalt Hacker News

freedombenyesterday at 3:00 PM3 repliesview on HN

For me it's a soft block rather than a hard block. I use multiple computers so when I switch to the other one I usually do a git pull, and after every commit I do a push. If that gets interrupted, then I have resort to things like rsyncing over from the other system, but more than once I've lost work that way. I'm strongly considering just standing up a VM and using "just git" and foregoing any UI, but I make use of other features like CI/CD and Releases for distribution, so the VM strategy is still just a bandaid. When the remote is unavailable, it can be very disruptive.


Replies

embedding-shapeyesterday at 3:04 PM

> If that gets interrupted, then I have resort to things like rsyncing over from the other system

I'm guessing you have SSH access between the two? You could just add it as another remote, via SSH, so you can push/pull directly between the two. This is what I do on my home network to sync configs and other things between various machines and OSes, just do `git remote add other-host git+ssh://[email protected]/~/the-repo-path` or whatever, and you can use it as any remote :)

Bonus tip: you can use local paths as git remote URLs too!

> but more than once I've lost work that way.

Huh, how? If you didn't push it earlier, you could just push it later? Some goes for pull? I don't understand how you could lose anything tracked in git, corruption or what happened?

show 1 reply
SoftTalkeryesterday at 3:03 PM

> just standing up a VM and using "just git"

That's what I do. Control your entire world yourself.

messeyesterday at 3:03 PM

If you can rsync from the other system, and likely have an SSH connection between them, why don't you just add it as an additional remote and git pull from it directly?

show 1 reply