【发布时间】:2014-12-30 22:56:19
【问题描述】:
我尝试了这个解决方案没有运气:How I can store some local changes that survives git reset --hard
基本上,我在服务器上有一个脚本,可以将我的 git 部署到站点。即使我这样做了:
git update-index --no-skip-worktree -- config/production.ini
是否有任何解决方案可以让我成功地避免每次都覆盖此配置文件?
我的脚本是这样的:
129 exec('git reset --hard', $output);
134 exec('git pull '.$this->_remote.' '.$this->_branch, $output);
所以基本上是git reset,然后是git pull。
【问题讨论】: