I
I
ImVeryStupid2020-07-08 11:56:00
git
ImVeryStupid, 2020-07-08 11:56:00

How to deploy only certain files from a bare repository?

The server has a bare repository where changes from the local PC are pushed and a working directory where the site is deployed after each push with the command:

git --work-tree=$TARGET --git-dir=$GIT_DIR checkout -f $BRANCH


I have a file among the files where the specified data for connecting the database. Naturally, this data is different on the local PC and the remote server. How to make sure that this file from the local PC is not replaced on a remote server?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2020-07-08
@Nc_Soft

Database configs should not be in the repository, either in env or in the .gitignore file.
Hence all the problems..

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question