I’m trying to get an idea how the SFTP package integrates with GIT, and whether it’s a good fit for my requirements.
If boils down to whether or not I correctly understand how it’s meant to work:
Current setup
- I have code on a Raspberry Pi that I maintain using an sftp connection from PCManFM in a Lubuntu development machine.
- I edit / manage the files directly from ST3, using gitsavvy to manage versions / push to remote branches etc.
- Under this setup, ST3 just sees the FTP directory as a (slow) local directory, no special work on my part aside from patience if an operation takes a while, and I need to remember to access the mapped ftp folder via PCManFM once, just to set things up before I open my project in ST3 following a reboot.
This works well enough, but I’d like to see if the sftp plugin gives me some speed / stability advantages, and I’d like to check if I understand how they’d interact correctly:
Proposed setup
- Using the sftp plugin, I map a remote ftp folder to a local folder.
- Any changes I make in ST3 at this point are made to the copy in the local folder. The sftp plugin will automatically sync files between the local and remote folders for me on save, with no manual interaction.
- When I use gitsavvy, again the git operations take place on the git repository in the local folder - all git operations are done with this local folder as the base
- The sftp plugin takes care of automatically keeping the local and remote ftp git repositories synced up so that - give or take a few seconds - if I was to try a git pull from the command line on the Raspberry Pi itself, I should never find there’s any update to apply, as it should be identical to the linked local copy.
Is this the behaviour I should expect? Have I correctly understood how these plugins operate together?