To distribute the code use Git.

If you need to install software to the customer, the git clone master of the branch on his server is done

If you need to update the software - git pull . But with git pull , one feature was discovered (it is clear that it was discovered for me :)) - it pulls changes if the commit has run on the server, and if we have a couple of files in the local repository but the committes on the server and locally match, they will not restore them. Is it possible to update the repository, so to speak, whether it is to check whether the number and content of files match locally and on the server and in case of a shortage, to fill it?

    2 answers 2

    Follow the repository directory:

     git checkout -- ./ && git pull 

    The first command will restore everything deleted / modified, the second will upload changes from the server.

      If you delete a file from the project folder, it will still remain in the local repository.

      To restore it, you need to make git checkout -- filename

      • Thanks for the answer, but you offer me a scalpel and I will take it into service, but the following answer is more general and in a particular case more suitable (those who will try to restore the missing files on the customer’s server are unlikely to know their names) - torokhkun
      • one
        @totorro git status will show all uncommitted changes (including deleted files with names), if you need to roll back a separate file. - free_ze