How can I automatically upload files to remote server when I make changes
It may depend on what type of files and what type of connection to the server you're using, but a good starting point would probably be Cyberduck, an FTP/SFTP client. You can open files directly off the server with any program on your Mac you choose, edit them as you would a local file (I believe they're actually stored in temporary local storage), and uploaded whenever your changes are saved.

Most other FTP programs should have this functionality built in as well.