A
A
Artem Kislenko2016-06-20 08:38:44
git
Artem Kislenko, 2016-06-20 08:38:44

Why is it not recommended to use a version control system in production?

Why is it not recommended to use a version control system on production? Those. you can’t just take and do, for example, git pull (svn update). You need to write some kind of script that would update production in accordance with the current situation. In git, this is, for example, a script that clones data from the desired branch, compares the difference of each file, and updates if necessary (well, or simply completely replaces the necessary folders).

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Ivan Filatov, 2016-06-20
@webwork

production is written as production
because there is no need to store production server settings in GIT. Only source files are stored in the control system.
then they are sent to CI (Continuous Integration), which, in case of a successful build, adds a deploy script for a specific production production. And uploads to the server, or uploads an archive for manual uploading.

K
Karim Kyatlottyavi, 2016-06-21
@constXife

I will add to all of the above that in some cases (often happens with PHP, for example), the .git folder may end up in a public directory and some attackers can steal all the site sources.

P
polifill, 2016-11-03
@polifill

Why not?
We used to do this when we worked with continuous integration and continuous deployment.
Another thing is that for production there is a separate branch, in which not everyone has write permissions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question