github - git远程本地均有更改的情况下本地提交远程如何保持远程某目录不变?
曾经蜡笔没有小新
曾经蜡笔没有小新 2017-05-02 09:43:17
0
1
685

本地更改代码提交到远程仓库部署,远程仓库的public目录下的文件需要保留,现在每次把本地代码push到远程时都会清空public目录,该怎么做才可以让远程仓库public目录下的文件不会被删除呢?

曾经蜡笔没有小新
曾经蜡笔没有小新

reply all(1)
漂亮男人

It shouldn’t be a direct replacement...

My approach, but it may not be accurate, I only provide a suggestion.

Generally, the code is first cloned into the deployment directory (Alibaba Cloud's CRP, you can send the source code package to the server, and then call the deployment script), and use the deployment script to do online processing (replacing files, modifying configurations, etc.)... For example, if you Public should not be overwritten. You can just write the logic in the deployment script. Generally, the project directory will not be directly replaced.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!