A
A
Alexander2017-05-23 16:14:05
git
Alexander, 2017-05-23 16:14:05

How to use GIT in web development if different branches need to have different files and configs?

As I understand it, the standard scheme is when there are three branches - develop, test, master. And with the help of the git, the combat version of the project (website) is updated. But what if some files need to be different? For example, configs, .htaccess are different. If you put them in gitignore, then you won't be able to track changes to them. And even if placed in gitignore, they will not be copied from repository to repository during deployment?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2017-05-23
@Austin_Powers

Get the .htaccess.dist config, and add the necessary changes there.
When you need to deploy the application, copy and rename to .htaccess.
Configs must be in gitignore, otherwise you can do "cases" by inattention.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question