git discard when composer update

当在项目中执行composer update或install时,如果本地子包出现修改,会出现如下提示,

Updating yk/laravel-device-operation dev-master (72ca476 => 862b337):     The package has modified files:
    M app/ServiceProvider.php
    Discard changes [y,n,v,d,s,?]?
y - discard changes and apply the update //丢弃修改执行更新操做 n - abort the update and let you manually clean things up //放弃更新操作 v - view modified files //查看有修改的文件 d - view local modifications (diff) //比较修改的内容,diff操作 s - stash changes and try to reapply them after the update //暂存修改,执行更新后释放修改 ? - print help

  一般我们选择s,类似于git stash后更新,然后git stash pop。有冲突再手工处理冲突。

转载于:https://www.cnblogs.com/age0420/p/10614588.html

你可能感兴趣的:(git discard when composer update)