There are multiple way to edit and commit file on a remote host, like VSCode, Jetbrains Sync. But sometimes these may not work for your case. For example:
- The host SSH-able does not connect to internet, so can’t do git pull.
- Glibc version too old for VSCode.
- Private repo not public available.
In these cases, one way to make it work is to use a local git repo on remote host, and push to it use SSH. (For example, below I use a private LustreSrc package I’m working on.)
On target host
|
|
On local git repo, which you should have already cloned it locally, add a remote target on host.
|
|
On target host
|
|
Then you are all set to do bi-directal sync between local and remote! Just push and commit as usual.