sublime-rsync-ssh icon indicating copy to clipboard operation
sublime-rsync-ssh copied to clipboard

Allow sync in both directions

Open rnewton opened this issue 10 years ago • 7 comments

It would be useful to allow rsync back to the local directory on a hotkey or command. My current workflow allows me to edit locally, but all of the git information is stored on the remote machine so if I were to rebase/merge I can't get those changes locally unless I rsync the project manually.

This is a great plugin, btw.

rnewton avatar Aug 17 '15 13:08 rnewton

I have thought about this feature many times, but I'm too afraid of accidental data loss when someone syncs from the remote and overrides local changes.

Why not have the .git locally as well?

davidolrik avatar Aug 17 '15 14:08 davidolrik

What if it was protected by a --dry-run flag by default or even had a confirmation before doing the sync? I don't see how any data loss could occur after you have to set the flag and confirm.

It's a bit of an odd git setup, to be fair. I have ssh keys setup on the remote, but not locally.

rnewton avatar Aug 17 '15 18:08 rnewton

I'm not convinced, how often have you clicked OK on a dialog, and afterwards thought: "What did I just click OK to?"

You could use your development box as a jump host using ProxyCommand and ssh -W:

Host git.example.com
    ProxyCommand ssh -W %h:%p dev.example.com 2>/dev/null

This will let you perform all git commands command locally.

davidolrik avatar Aug 17 '15 18:08 davidolrik

I think it's a nice feature that it can sync from remote to local In my project,I have some compile task in remote server,and want to sync compile result to local.

Now I use SFTP+rsync ssh,the SFTP have some bug to upload file(trigger file change event when file has not uploaded ),rsync ssh can't download file....I think the solution no good enough..

zjjott avatar Oct 04 '15 15:10 zjjott

Possible solution to this issue: #37.

davidolrik avatar Jan 09 '16 12:01 davidolrik

I have thought about this feature many times, but I'm too afraid of accidental data loss when someone syncs from the remote and overrides local changes.

It's one of those things: Backups, BACKUPS... check the backups

I have the need for the pulling, as I edit locally on both my Laptop (at client site) and my desktop (while working from home), and the pull is the way to get "fixes" I made on the remote back to the locals... but yes, I still do my git push/pull from the desktop/laptop.

hevisko avatar Apr 02 '19 15:04 hevisko

I'm pondering a "reverse" sync as well, for the reason of getting coverage output from test runs back locally. I'm siding with @davidolrik on the caution side and am wondering whether to implement the reverse sync in a way that you need to explicitly mark targets that you want sync and can thus make it as careful as you want to (like: only this directory and this file) ... how does that sound to you @davidolrik ?

ctheune avatar Sep 08 '23 13:09 ctheune