2

To elaborate: I connect to remote machine which has unstable connection with my local machine, but still stable enough to pull and update git from a repo without breaking.

That means when I command git pull on a remote machine over a remote connection (via SSH), the SSH session usually breaks thus;git process stops. But if I go to the remote machine physically and order git pull on the remote machine, it can complete pull process even though it's slow. Both hold true regardless of protocol used by git(SSH,HTTPS).

How can I make the pull process on the remote machine independent from remote connection from my local machine?

1 Answers1

1

Technically, you can make a remote ssh command run in the background of the remote machine.

So something like this could be an acceptable workaround (with the caveat you might not see the full output or know immediately if the command completed)

ssh -n -f user@host "sh -c 'git clone /url/ /a/pth > /dev/null 2>&1 &'"

The idea is: the clone initiated on the remote machine in the background won't stop if the ssh session breaks.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250