VS Code: Sync files to network drive

Soldato
Joined
26 Sep 2010
Posts
7,259
Location
Stoke-on-Trent
Hi all

Does anybody know of a way to automatically sync files to a network drive in Visual Studio code? I run a small web server on my network to build and test with that storage folder mapped to a network drive.

back in my Dreamweaver days, I had a site config set up to automatically push files when saved to that network drive, so I could code locally, automatically deploy to the test server and then F5 the browsers to test changes.

Is there any way I can replicate this simple functionality in VS Code? Extensions are fine, scripts running the background are fine too. I was looking at an FTP extension, but that would involve setting up an FTP service on the server, which seems overboard, as is deploying some full Git-based version control which I just don't need coding solo at home :P

Tips and suggestions welcome.

Cheers
 
Just setup a github account like everyone else. You don't have to share it with the world as private repos are free since the evil empire that is MS took over. Since you're using VS Code, I assume you don't have a problem with that. :p

I don't really use Code but I assume it has git support built in or there are extensions for it??
 
I think you can set up Git to push to a network drive. I’ve not tried it mind... I use it with Azure DevOps and let pushing to the repo trigger the automated build and publish.

As above, I don’t really use VS Code much either, but I’m sure it will play nicely with Git.
 
Looks like there are quite a few extensions that will do this job such as SFTP . Github would be fine for storing the files but this will not deploy them to your local server unless you have other bits setup but you could create a git server on your local server which you could push from.
 
Surely just create a local drive mapping to the web server root directory and develop 'off' that drive?

Otherwise, if you're on Windows you can use something like Syncback that'll automatically sync multiple directories when files are modified.
 
I think you can set up Git to push to a network drive. I’ve not tried it mind... I use it with Azure DevOps and let pushing to the repo trigger the automated build and publish.

As above, I don’t really use VS Code much either, but I’m sure it will play nicely with Git.
Is that something you've manually setup or is it done with an extension?
 
Is that something you've manually setup or is it done with an extension?

The build and publish? You can either do it manually with the YAML file format Azure DevOps uses or the online tool which will guide you through it. Both can be a PITA! :D

In terms of VS Code extensions, I’ve not much of an idea really... I use full fat Visual Studio 99+% of the time.
 
Just setup a github account like everyone else. You don't have to share it with the world as private repos are free since the evil empire that is MS took over. Since you're using VS Code, I assume you don't have a problem with that. :p

I don't really use Code but I assume it has git support built in or there are extensions for it??

Not everyone likes to use external methods, personally I only push projects that are somewhat public (discord bots, websites etc) but I have a lot of projects that I'd rather not store externally even if its private, so it's quite understanding really.
 
Where are they stored? On the local network or externally? If local you can just mount it directly in vscode via a network drive, if externally you could go with ftp like you said, another option is syncing a cloud service on your desktop and the external source, though that's more of a lazy option haha
 
Back
Top Bottom