When developing web applications, how does one keep local files and remote files synced together? There is the obvious way, whenever you edit a file on your local machine, just upload that file to the remote machine. Is there a more efficient way? I ask because I have been using subversion control, and it is so easy to keep files synced on a remote server. All I have to do is "commit" and it will find the files which need to be replaced.
3 Answers
I'm using rsync for that purposes. Works on Windows, Mac, and Unix/Linux. A little bit hard with file permissions on Windows, but after few hours of digging I managed to do it right. Very fast when synchronizing file trees.

- 513
Here are some options:
Software
Web development suites for Mac OS X like Espresso and Coda have automatic FTP upload functions, where you can click a button and all the changed files in your local server upload replace the old ones in the remote server.
For Windows: Although there is no direct equivalent of these programs, Aptana is an IDE that has FTP-upload functions, or Notepad++ could work with it's ftp_synchronize
plugin.
Symlinks
You could also set up a symlink between your local webserver root and a mounted FTP folder in your file structure like this:
ln -s ~/path/to/local/server ~/path/to/FTP/client/
Then, every time you change anything in the local folder, it is automatically placed/replaced into the FTP folder you have mounted. (On Windows, use mklink /d
instead of ln -s
).
Scripts
Additionally, if you wanted to, you could write a script (Applescript on a Mac, or VBscript on Windows) that uploads the files, however, this could get complicated and would require advanced knowledge of the scripting language of your OS.

- 3,137

- 215
- 3
- 9
-
Under the software category, is there anything for Windows that does that? – Kelp Mar 20 '11 at 07:57
-
Unfortunately, Windows is rather lacking in this area, as most good web development apps are made for Mac OS X. However, check out this question (http://stackoverflow.com/questions/869886/pc-equivalent-of-coda), and see if there's something there you would like. – element119 Mar 20 '11 at 15:35
On a PC, provided the destination (web server file system) is accessible as a UNC path or drive letter you can use any one of a number of backup programs to do this.

- 14,942
svn
to be installed on the webserver. – reinierpost Oct 16 '15 at 10:15