84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
同一套代码服务器和开发环境有不同的配置文件,通过.gitignore我可以在开发的时候忽略配置文件的提交,但是我的需求不是这样,我需要把配置文件加入版本控制,但是服务器并不需要拉取开发端的配置文件。
也就是说,我在服务器上git pull代码的时候需要忽略配置文件,应该用什么命令呢?
我使用类似git update-index --assume-unchanged config/config.php的命令并没有作用。
git update-index --assume-unchanged config/config.php
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.)
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.)