How to ignore specified files in Git pull
巴扎黑
巴扎黑 2017-05-02 09:38:48
0
1
681

The same set of code servers and development environments have different configuration files. Through .gitignore, I can ignore the submission of configuration files during development, but my needs are not like this. I need to add the configuration files to version control, but the server does not There is no need to pull the development-side configuration file.

In other words, I need to ignore the configuration file when I git pull the code on the server. What command should I use?

I used commands like git update-index --assume-unchanged config/config.php and it didn’t work.

巴扎黑
巴扎黑

reply all(1)
仅有的幸福

You can modify your config on the server so that the configuration files on the server will not be overwritten when you git pull.
(ps: It is recommended to use rsync to implement code online deployment.)

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template