VS Code: Sync files to network drive

Soldato
Joined
26 Sep 2010
Posts
7,201
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
 
Soldato
Joined
6 Feb 2004
Posts
20,668
Location
England
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??
 
Associate
Joined
25 Jun 2009
Posts
1,260
Location
Guernsey
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.
 
Associate
Joined
26 Apr 2012
Posts
1,195
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.
 
Soldato
Joined
3 Jun 2005
Posts
3,117
Location
The South
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.
 
Soldato
Joined
18 Oct 2002
Posts
4,668
Location
Newton
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?
 
Associate
Joined
25 Jun 2009
Posts
1,260
Location
Guernsey
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.
 
Associate
Joined
21 Mar 2016
Posts
115
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.
 
Associate
Joined
21 Mar 2016
Posts
115
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