I have a local copy of the project and the one on the battle server. When I change something in a local copy, I need to apply all changes on the battle server.

Now I use the stupid FTP method, that is, roughly speaking, every time I copy all the project files. Please tell me the way how to organize all this normally.

PS I tried SVN but did not find any materials or articles on how to organize it all from scratch. I stopped at the fact that those support set up SVN for me on the hosting and on the desktop I installed the TortioseSVN client on a dead end. Please describe in more detail and step by step how and what to do. or links to sources where everything is described in great detail for the beginner

    1 answer 1

    Use the post-commit hook and write your own little script. The network should be full of instructions on this topic, look better.

    Sample steps are:

    • We create a working copy of the /trunk website on the hosting in the folder where you previously downloaded files via FTP. Those. on the hosting, you need to run a command like svn checkout https://svn.example.com/svn/MyWebSite/trunk .

    • We set up a hook in the repository that will run svnlook changed to analyze the paths that the new revision has affected in the repository (regexp to help). If the commit has affected / trunk, then you need to run svn update on the hosting in order to update the working copy and pull up the changes from the repository.

    It would be possible to do all this without committing to / trunk whether or not there is a commit. But with the analysis is better, because if you commit to other repository projects or to / branches / tags / shelves, the update of the working copy does not start. Although for a small project it is not at all important.