Search code examples
version-controlsynchronizationrepositorysamba

Best way to synchronize local code with server


I am looking for the most efficient way to synchronize local copy of code with a server in real time and hope it could automatically update changed files as soon as I save them on the local machine.

I am currently accessing remote resource via Samba but it is slow and almost unusable. I do not edit files on the server so there is no need for comparing them with local copy.

A little context: I edited project on Windows using Eclipse as IDE. The server is running on Linux and I have used it to compile and run code. What I need is the local copy of the program for quick searching in files and opening them. Then I will edit and save one of them. I would like it to automatically be uploaded to repository.

Currently I am using FreeFileSync with real time sync of only one small directory for speed but I hope that the solution could monitor the whole source code.


Solution

  • How about defining it as a remote project that you connect to via SSH? You can set up a project with a remote (SSH) source. Setting Eclipse up to do this should be more efficient than going for a low-level solution. Combining this with source code management should be helpful. With any SCM (such as Git), you can commit code and instruct your server to pull changes.