A
A
akula222017-06-19 17:04:12
git
akula22, 2017-06-19 17:04:12

How can I better organize the compatibility of local and server configs?

I program the site at home, then I send it to bitbasket, and I make a pool on the hosting.
There is one problem, at home in the index.php file and db.php settings for the developer and the local database.
How can I organize compatibility more competently, so that later I don’t have to edit the configs manually on FTP.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Burov, 2017-06-19
@BuriK666

make a separate config.php and add it to .gitignore
you can add some config.example.php to the repository

A
akula22, 2017-06-19
@akula22

to catch up with the question, I made changes locally, pushed them to the server,
then I try to make a pull on the hosting and this error
* branch master -> FETCH_HEAD
Updating 131e2d0..d6af72f
error: Your local changes to the following files would be overwritten by merge:
config/main.php
modules/forum/views/backend/view.php
modules/forum/views/default/viewTopic.php
modules/pm/views/default/_index_item.php
modules/post/controllers/BackendController.php
modules/post /views/default/view.php
modules/site/views/default/_top_players.php
modules/tour/controllers/BackendController.php
public_html/css/style.css
rbac/rules/OwnerRule.php
views/layouts/main.php
widgets/views/widgetLoginMobile.php
Please, commit your changes or stash them before you can merge.
Aborting Is
it possible to get around this without deleting all these files on the hosting again? Surely there is some command that will forcefully replace the old files with new ones

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question