Clarification when using VCS, for example Git

I understand the basic and how the workflow works and what doesn't. However, let's say I have a local repository on my Linux workstation. Now I also have a production box located on the VPS in the remote DC. If I wanted to release a new code into a production box, what's the best way to do this? I do not want to have a Git repository, it should just have its web code (php / mysql).

How to push new changes to the production box without sending over all files?

+3
source share
2 answers

One way to manage web content is to create a bare repository in the production window. This is a repository that does not have a working copy. When you want to deploy new code, you must click on this repository to update it. Then go into the production box and pull it from the bare repository into your actual deployment directory (which is also the Git repository).

Note that none of these repositories in the production window should be considered as the "main" repository; You can save the source code in another place and just click on the production as needed.

, , , Git pushing . Git ( ), .

-, . , , , - , , . , , .

+4

, , , , ... , github VPS. , , , ( git ), , " ", ( ).

, ( ... )

+1

Source: https://habr.com/ru/post/1716627/


All Articles